[
  {
    "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 Compiler Plugin\"\n  homepage: https://maven.apache.org/plugins/maven-compiler-plugin/\n  labels:\n    - java\n    - build-management\n    - maven-plugins\n    - maven\n    - hacktoberfest\n  enabled_merge_buttons:\n    squash: true\n    merge: false\n    rebase: true\n  protected_branches:\n    master: { }\n    maven-compiler-plugin-3.x: { }\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\nf7a4613eaa2364dcaf10f96f04a6b1afb2feb7ed\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: massage\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: massage\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\n"
  },
  {
    "path": ".github/dependabot.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\nversion: 2\nupdates:\n  - package-ecosystem: \"maven\"\n    directory: \"/\"\n    schedule:\n      interval: \"daily\"\n\n  - package-ecosystem: \"maven\"\n    directory: \"/\"\n    schedule:\n      interval: \"daily\"\n    target-branch: \"maven-compiler-plugin-3.x\"\n\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\"\n    schedule:\n      interval: \"daily\"\n\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\"\n    schedule:\n      interval: \"daily\"\n    target-branch: \"maven-compiler-plugin-3.x\"\n"
  },
  {
    "path": ".github/pull_request_template.md",
    "content": "Following this checklist to help us incorporate your\ncontribution quickly and easily:\n\n- [ ] Your pull request should address just one issue, without pulling in other changes.\n- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.\n- [ ] Each commit in the pull request should have a meaningful subject line and body. \n  Note that commits might be squashed by a maintainer on merge.\n- [ ] Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. \n  This may not always be possible but is a best-practice.\n- [ ] Run `mvn verify` to make sure basic checks pass.\n  A more thorough check will be performed on your pull request automatically.\n- [ ] You have run the integration tests successfully (`mvn -Prun-its 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- [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).\n"
  },
  {
    "path": ".github/release-drafter-3.x.yml",
    "content": "\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_extends: maven-gh-actions-shared:.github/release-drafter.yml\ntag-template: maven-compiler-plugin-$RESOLVED_VERSION\n"
  },
  {
    "path": ".github/release-drafter.yml",
    "content": "\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_extends: maven-gh-actions-shared\ntag-template: maven-compiler-plugin-$RESOLVED_VERSION\n\ninclude-pre-releases: true\nprerelease: true\n\nheader: |  \n  > [!WARNING]\n  > This plugin is a Maven 4 plugin and requires Maven 4.x to run.\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.\n\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    with:\n      jdk-distribution-matrix: '[ \"temurin\", \"zulu\", \"microsoft\", \"adopt-openj9\" ]'\n      maven4-build: true\n      maven4-version: '4.0.0-rc-4' # the same as used in project\n      matrix-exclude: '[\n        { \"jdk\": \"25\", \"distribution\": \"adopt-openj9\" },\n        { \"jdk\": \"25\", \"distribution\": \"microsoft\"}     \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\n  workflow_dispatch:\n\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: '14 3 * * *'\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"
  },
  {
    "path": "Jenkinsfile.disable",
    "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(jdks:[ \"17\", \"21\" ], maven: [ \"4.0.x\" ], siteJdk:[ \"17\" ], siteMvn:[ \"4.0.x\" ])\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": "NOTICE",
    "content": "Apache Maven Compiler Plugin\nCopyright 2007-2024 The Apache Software Foundation\n\nThis product includes software developed at\nThe Apache Software Foundation (http://www.apache.org/).\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 Compiler Plugin](https://maven.apache.org/plugins/maven-compiler-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-compiler-plugin.svg?label=Maven%20Central&versionPrefix=3.)](https://search.maven.org/artifact/org.apache.maven.plugins/maven-compiler-plugin)\n[![Maven Central](https://img.shields.io/maven-central/v/org.apache.maven.plugins/maven-compiler-plugin.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.apache.maven.plugins/maven-compiler-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-compiler-plugin/badge.json)](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/apache/maven/plugins/maven-compiler-plugin/README.md)\n<!--\n[![Jenkins Status](https://img.shields.io/jenkins/s/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven-compiler-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-compiler-plugin/job/master.svg?)][test-results]\n-->\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\nBuild requirements\n--------------\n\nBuilding requires Maven 4. Executing the tests on Windows requires the developer mode.\nThis is enabled with _Settings_ > _Update & Security_ > _For Developers_.\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\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 Twitter Account](https://twitter.com/ASFMavenProject)\n+ #Maven IRC channel on freenode.org\n\n[license]: https://www.apache.org/licenses/LICENSE-2.0\n[ml-list]: http://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-compiler-plugin/job/master/lastCompletedBuild/testReport/\n[build]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-compiler-plugin/job/master/\n"
  },
  {
    "path": "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\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-compiler-plugin</artifactId>\n  <version>4.0.0-beta-5-SNAPSHOT</version>\n  <packaging>maven-plugin</packaging>\n\n  <name>Apache Maven Compiler Plugin</name>\n  <description>The Compiler Plugin is used to compile the sources of your project.</description>\n  <inceptionYear>2001</inceptionYear>\n\n  <contributors>\n    <contributor>\n      <name>Jan Sievers</name>\n    </contributor>\n    <contributor>\n      <name>Trygve Laugstøl</name>\n      <email>trygvis@inamo.no</email>\n    </contributor>\n    <contributor>\n      <name>Jason van Zyl</name>\n      <email>jason@maven.org</email>\n    </contributor>\n    <contributor>\n      <name>Andreas Gudian</name>\n    </contributor>\n    <contributor>\n      <name>Martin Desruisseaux</name>\n    </contributor>\n  </contributors>\n\n  <prerequisites>\n    <maven>${mavenVersion}</maven>\n  </prerequisites>\n\n  <scm>\n    <connection>scm:git:https://github.com/apache/maven-compiler-plugin.git</connection>\n    <developerConnection>scm:git:https://github.com/apache/maven-compiler-plugin.git</developerConnection>\n    <tag>HEAD</tag>\n    <url>https://github.com/apache/maven-compiler-plugin/tree/${project.scm.tag}</url>\n  </scm>\n  <issueManagement>\n    <system>GitHub</system>\n    <url>https://github.com/apache/maven-compiler-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-compiler-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    <javaVersion>17</javaVersion>\n    <mavenVersion>4.0.0-rc-4</mavenVersion>\n\n    <asmVersion>9.9.1</asmVersion>\n    <guiceVersion>6.0.0</guiceVersion>\n    <mockitoVersion>5.23.0</mockitoVersion>\n    <eclipseCompilerVersion>3.42.0</eclipseCompilerVersion>\n    <version.maven-plugin-tools-3.x>3.13.1</version.maven-plugin-tools-3.x>\n    <version.maven-plugin-tools>4.0.0-beta-1</version.maven-plugin-tools>\n\n    <invoker.junitPackageName>org.apache.maven.plugins.compiler.its</invoker.junitPackageName>\n    <maven.it.failure.ignore>false</maven.it.failure.ignore>\n\n    <project.build.outputTimestamp>2026-01-27T00:46:35Z</project.build.outputTimestamp>\n\n    <!-- TODO remove with next parent -->\n    <maven4x.site.path>plugins-archives/${project.artifactId}-LATEST-4.x</maven4x.site.path>\n    <version.maven-compiler-plugin>3.14.1</version.maven-compiler-plugin>\n    <version.maven-dependency-plugin>3.9.0</version.maven-dependency-plugin>\n    <version.maven-invoker-plugin>3.9.1</version.maven-invoker-plugin>\n    <!-- 4.x publish -->\n    <maven.site.path>${maven4x.site.path}</maven.site.path>\n\n    <maven.compiler.source />\n    <maven.compiler.target />\n    <maven.compiler.release>17</maven.compiler.release>\n    <minimalJavaBuildVersion>${maven.compiler.release}</minimalJavaBuildVersion>\n\n  </properties>\n\n  <dependencies>\n    <!-- Maven -->\n    <dependency>\n      <groupId>org.apache.maven</groupId>\n      <artifactId>maven-api-annotations</artifactId>\n      <version>${mavenVersion}</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven</groupId>\n      <artifactId>maven-api-core</artifactId>\n      <version>${mavenVersion}</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven</groupId>\n      <artifactId>maven-api-di</artifactId>\n      <version>${mavenVersion}</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven</groupId>\n      <artifactId>maven-api-model</artifactId>\n      <version>${mavenVersion}</version>\n      <scope>provided</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.ow2.asm</groupId>\n      <artifactId>asm</artifactId>\n      <version>${asmVersion}</version>\n    </dependency>\n\n    <dependency>\n      <groupId>org.apache.maven</groupId>\n      <artifactId>maven-impl</artifactId>\n      <version>${mavenVersion}</version>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven</groupId>\n      <artifactId>maven-testing</artifactId>\n      <version>${mavenVersion}</version>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>com.google.inject</groupId>\n      <artifactId>guice</artifactId>\n      <version>${guiceVersion}</version>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.mockito</groupId>\n      <artifactId>mockito-core</artifactId>\n      <version>${mockitoVersion}</version>\n      <scope>test</scope>\n    </dependency>\n    <dependency>\n      <groupId>org.junit.jupiter</groupId>\n      <artifactId>junit-jupiter-api</artifactId>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <configuration>\n            <release>${javaVersion}</release>\n          </configuration>\n        </plugin>\n        <plugin>\n          <groupId>com.diffplug.spotless</groupId>\n          <artifactId>spotless-maven-plugin</artifactId>\n          <configuration>\n            <java>\n              <includes>\n                <include>src/**/*.java</include>\n              </includes>\n            </java>\n            <pom>\n              <includes>\n                <include>**/pom.xml</include>\n              </includes>\n            </pom>\n          </configuration>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-surefire-plugin</artifactId>\n          <configuration>\n            <redirectTestOutputToFile>true</redirectTestOutputToFile>\n            <excludes>\n              <exclude>unit/**</exclude>\n            </excludes>\n          </configuration>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-pmd-plugin</artifactId>\n          <configuration>\n            <targetJdk>${maven.compiler.release}</targetJdk>\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              <goals>\n                <goal>enforce</goal>\n              </goals>\n              <configuration>\n                <rules>\n                  <enforceBytecodeVersion>\n                    <maxJdkVersion>${maven.compiler.release}</maxJdkVersion>\n                  </enforceBytecodeVersion>\n                </rules>\n                <fail>true</fail>\n              </configuration>\n            </execution>\n          </executions>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n\n  <profiles>\n    <profile>\n      <id>run-its</id>\n      <build>\n        <pluginManagement>\n          <plugins>\n            <plugin>\n              <groupId>org.apache.maven.plugins</groupId>\n              <artifactId>maven-invoker-plugin</artifactId>\n              <executions>\n                <execution>\n                  <id>integration-test</id>\n                  <configuration>\n                    <debug>true</debug>\n                    <projectsDirectory>src/it</projectsDirectory>\n                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>\n                    <pomIncludes>\n                      <pomInclude>*/pom.xml</pomInclude>\n                      <pomInclude>extras/*/pom.xml</pomInclude>\n                      <pomInclude>multirelease-patterns/*/pom.xml</pomInclude>\n                    </pomIncludes>\n                    <!--\n                      ! Unfortunately we can't define an execution order.\n                      ! https://issues.apache.org/jira/browse/MINVOKER-174\n                      -->\n                    <setupIncludes>\n                      <setupInclude>setup*/pom.xml</setupInclude>\n                    </setupIncludes>\n                    <postBuildHookScript>verify</postBuildHookScript>\n                    <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>\n                    <settingsFile>src/it/settings.xml</settingsFile>\n                    <ignoreFailures>${maven.it.failure.ignore}</ignoreFailures>\n                    <streamLogsOnFailures>true</streamLogsOnFailures>\n                    <goals>\n                      <goal>clean</goal>\n                      <goal>test-compile</goal>\n                    </goals>\n                  </configuration>\n                </execution>\n              </executions>\n            </plugin>\n          </plugins>\n        </pluginManagement>\n      </build>\n    </profile>\n  </profiles>\n</project>\n"
  },
  {
    "path": "src/it/CHANGES_v3_to_v4.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-->\n\n# Changes in integration tests since Maven 3\nThis section describes noticeable changes in the tests of Maven Compiler Plugin 4\ncompared to the tests of Maven Compiler Plugin 3.\nThe purpose of this section is to help the port of new tests added to the Maven Compiler Plugin 3\nby documenting which tests to ignore and what to modify in new tests.\n\n## Changes in POM parameters\nMoved or added the following configuration parameters in the `pom.xml` files of some tests:\n\n* The `<outputDirectory>` and `<testOutputDirectory>` parameters declared under `<configuration>`\n  moved to `<build>`, because those properties are read-only in the configuration.\n* Many `<source>` and `<target>` parameters have been either removed or replaced by `<release>`.\n* For some tests using a non-modular JAR in a modular project,\n `<type>modular-jar</type>` has been added in the dependency declaration.\n\n## Changes to met new plugin assumptions\nThe plugin incremental compilation algorithm depends on the convention that\nJava source files are located in directories of the same name as their package names,\nwith the `.` separator replaced by path separator (`/` or `\\`).\nThis is a very common convention, but not strictly required by the Java compiler.\nFor example, if the `src/main/java/MyCode.java` file contains the `package foo` statement,\nthe compiled class will be located in `target/classes/foo/MyCode.class` — note the `foo` additional directory.\nIn such case, the incremental build algorithm will not track correctly the changes.\nThe following tests have been made compliant with the convention for allowing the algorithm to work:\n\n* `mcompiler-182` in integration tests.\n\nNote that due to [MCOMPILER-209](https://jira.codehaus.org/browse/MCOMPILER-209),\nthe old algorithm was compiling everything without really detecting change.\nSo this issue is maybe not really a regression.\nTo reproduce the old behavior, users can just disable the incremental compilation.\n\n## Removed integration tests\nThe tests in the following directories were already disabled and have been removed:\n\n* `MCOMPILER-197` because it ran only on Java 8 while the build now requires Java 17.\n* `MCOMPILER-346` because it tests an issue fixed in Java 15 while the build now requires Java 17.\n* `groovy-project-with-new-plexus-compiler` because it ran only on Java 8 and the plexus compiler has been removed.\n\nThe tests in the following directores are not supported anymore and have been removed:\n\n* `release-without-profile` because the plugin no longer try to chose automatically\n   which parameters to use between `--source` and `--release`. This is justified by\n   the fact that the plugin cannot run on Java 8.\n* `release-without-profile-fork` for the same reason as above.\n* `MCOMPILER-190`, which has been replaced by `MCOMPILER-609`.\n  They are compilation tests using the Eclipse compiler, but the former test depended on Nexus.\n  It has been replaced by a test that depends on `javax.tools`.\n\n\n## Removed JUnit tests\nRemoved the following directories and associated test methods:\n\n* `compiler-one-output-file-test2` because it was redundant with `compiler-one-output-file-test`.\n\nThe only difference was the addition of include/exclude filters, but that difference had\nno effect because the compiler mock used in this test was ignoring all sources anyway.\nThis test has been replaced by `compiler-modular-project`.\n"
  },
  {
    "path": "src/it/MCOMPILER-129/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 compile\n"
  },
  {
    "path": "src/it/MCOMPILER-129/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler-129</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <description>Test to verify usage of javac -J option</description>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <fork>true</fork>\n          <compilerArgs>\n            <compilerArg>-J-Duser.language=en_us</compilerArg>\n          </compilerArgs>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-129/src/main/java/MyClass.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 foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/MCOMPILER-157/annotation-processor/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\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>compiler-test</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>annotation-processor</artifactId>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-157/annotation-processor/src/main/java/org/issue/SimpleAnnotation.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.issue;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n@Target(ElementType.TYPE)\n@Retention(RetentionPolicy.SOURCE)\npublic @interface SimpleAnnotation {}\n"
  },
  {
    "path": "src/it/MCOMPILER-157/annotation-processor/src/main/java/org/issue/SimpleAnnotationProcessor.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.issue;\n\nimport javax.annotation.processing.AbstractProcessor;\nimport javax.annotation.processing.Filer;\nimport javax.annotation.processing.RoundEnvironment;\nimport javax.annotation.processing.SupportedAnnotationTypes;\nimport javax.annotation.processing.SupportedSourceVersion;\nimport javax.lang.model.SourceVersion;\nimport javax.lang.model.element.Element;\nimport javax.lang.model.element.Name;\nimport javax.lang.model.element.PackageElement;\nimport javax.lang.model.element.TypeElement;\nimport javax.lang.model.util.Elements;\nimport javax.tools.FileObject;\nimport javax.tools.StandardLocation;\n\nimport java.io.IOException;\nimport java.io.Writer;\nimport java.util.Set;\n\n@SupportedSourceVersion(SourceVersion.RELEASE_17)\n@SupportedAnnotationTypes(\"org.issue.SimpleAnnotation\")\npublic class SimpleAnnotationProcessor extends AbstractProcessor {\n\n    @Override\n    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {\n        Filer filer = processingEnv.getFiler();\n        Elements elementUtils = processingEnv.getElementUtils();\n        Set<? extends Element> elements = roundEnv.getElementsAnnotatedWith(SimpleAnnotation.class);\n\n        for (Element element : elements) {\n            Name name = element.getSimpleName();\n            PackageElement packageElement = elementUtils.getPackageOf(element);\n            try {\n                FileObject resource = filer.createResource(\n                        StandardLocation.SOURCE_OUTPUT, packageElement.getQualifiedName(), name + \".txt\", element);\n\n                Writer writer = resource.openWriter();\n                writer.write(name.toString());\n                writer.close();\n            } catch (IOException e) {\n                throw new RuntimeException(e);\n            }\n        }\n        return !elements.isEmpty();\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-157/annotation-user/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\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>compiler-test</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>annotation-user</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>annotation-processor</artifactId>\n      <version>1.0-SNAPSHOT</version>\n      <scope>provided</scope>\n    </dependency>\n\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <annotationProcessors>\n            <annotationProcessor>org.issue.SimpleAnnotationProcessor</annotationProcessor>\n          </annotationProcessors>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>annotation-verify-plugin</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n        <executions>\n          <execution>\n            <id>verify-annotations</id>\n            <goals>\n              <goal>read-source</goal>\n            </goals>\n            <configuration>\n              <sourceClass>org.issue.SimpleObject</sourceClass>\n              <testSourceClass>org.issue.SimpleTestObject</testSourceClass>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-157/annotation-user/src/main/java/org/issue/SimpleObject.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.issue;\n\n@SimpleAnnotation\npublic class SimpleObject {}\n"
  },
  {
    "path": "src/it/MCOMPILER-157/annotation-user/src/test/java/org/issue/SimpleTestObject.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.issue;\n\n@SimpleAnnotation\npublic class SimpleTestObject {}\n"
  },
  {
    "path": "src/it/MCOMPILER-157/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=process-test-classes\n"
  },
  {
    "path": "src/it/MCOMPILER-157/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>compiler-test</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <modules>\n    <module>annotation-processor</module>\n    <module>annotation-user</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>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-170/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 compile -T4\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-1/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.plugins.compiler.it</groupId>\n    <artifactId>mcompiler-170</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>mcompiler-170-1</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <name>mcompiler-170-1</name>\n  <url>http://maven.apache.org</url>\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/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.compiler.it;\n\n/**\n * Hello world!\n */\npublic class App {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App2.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App2 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App3.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App3 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App4.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App4 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App5.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App5 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App6.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App6 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-1/src/main/java/org/apache/maven/plugins/compiler/it/App7.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App7 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-2/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.plugins.compiler.it</groupId>\n    <artifactId>mcompiler-170</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>mcompiler-170-2</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <name>mcompiler-170-1</name>\n  <url>http://maven.apache.org</url>\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/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.compiler.it;\n\n/**\n * Hello world!\n */\npublic class App {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App2.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App2 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App3.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App3 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App4.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App4 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App5.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App5 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App6.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App6 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-2/src/main/java/org/apache/maven/plugins/compiler/it/App7.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App7 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-3/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.plugins.compiler.it</groupId>\n    <artifactId>mcompiler-170</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>mcompiler-170-3</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <name>mcompiler-170-1</name>\n  <url>http://maven.apache.org</url>\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/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.compiler.it;\n\n/**\n * Hello world!\n */\npublic class App {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App2.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App2 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App3.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App3 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App4.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App4 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App5.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App5 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App6.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App6 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-3/src/main/java/org/apache/maven/plugins/compiler/it/App7.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App7 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-4/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.plugins.compiler.it</groupId>\n    <artifactId>mcompiler-170</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>mcompiler-170-4</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <name>mcompiler-170-1</name>\n  <url>http://maven.apache.org</url>\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/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.compiler.it;\n\n/**\n * Hello world!\n */\npublic class App {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App2.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App2 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App3.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App3 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App4.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App4 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App5.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App5 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App6.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App6 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/mcompiler-170-4/src/main/java/org/apache/maven/plugins/compiler/it/App7.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.compiler.it;\n\n/**\n * Hello world!\n *\n */\npublic class App7 {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public static void mainFoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void bar(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void foo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n\n    public void barfoo(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-170/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler-170</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n  <modules>\n    <module>mcompiler-170-1</module>\n    <module>mcompiler-170-2</module>\n    <module>mcompiler-170-3</module>\n    <module>mcompiler-170-4</module>\n  </modules>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-192/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 compile -B\ninvoker.buildResult = failure\n"
  },
  {
    "path": "src/it/MCOMPILER-192/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>MCOMPILER-192</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <fork>true</fork>\n          <includes>\n            <include>dummy/*.java</include>\n            <include>dummy/license.txt</include>\n          </includes>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-192/src/main/java/dummy/HelloWorld.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 dummy;\n\npublic class HelloWorld {\n    public static void main(String[] argv) {\n        System.out.println(\"Hello World\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-192/src/main/java/dummy/license.txt",
    "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\nIt's mine"
  },
  {
    "path": "src/it/MCOMPILER-192/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 */\ndef logFile = new File( basedir, 'build.log' )\nassert logFile.exists()\n\ndef content = logFile.getText('UTF-8')\n\ndef causedByExpected = content.contains ( 'Caused by: org.apache.maven.plugin.compiler.CompilationFailureException:' )\ndef twoFilesBeingCompiled = content.contains ( 'Compiling all files' )\ndef checkResult = content.contains ( 'BUILD FAILURE' )\ndef compilationFailure1 = content.contains( '[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:')\ndef compilationFailure2 = content.contains( ':compile (default-compile) on project MCOMPILER-192: Cannot compile')\n\nprintln \"Jenkins: causedByExpected:${causedByExpected} twoFilesBeingCompiled:${twoFilesBeingCompiled} checkResult: ${checkResult} compilationFailure1: ${compilationFailure1} compilationFailure2: ${compilationFailure2}\"\n\n// We need to combine different identification to handle differences between OS's and JDK's.\ndef finalResult = twoFilesBeingCompiled && checkResult && causedByExpected && compilationFailure1 && compilationFailure2\n\nif ( !finalResult ) {\n  throw new RuntimeException( \"log does not contain expected result to be failed but <startLog>\" + content + \"</startLog>\")\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-203-processorpath/annotation-processor/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\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>compiler-test</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>annotation-processor</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.commons</groupId>\n      <artifactId>commons-lang3</artifactId>\n      <version>3.18.0</version>\n    </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-203-processorpath/annotation-processor/src/main/java/org/issue/SimpleAnnotationProcessor.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.issue;\n\nimport javax.annotation.processing.AbstractProcessor;\nimport javax.annotation.processing.Filer;\nimport javax.annotation.processing.RoundEnvironment;\nimport javax.annotation.processing.SupportedAnnotationTypes;\nimport javax.annotation.processing.SupportedSourceVersion;\nimport javax.lang.model.SourceVersion;\nimport javax.lang.model.element.Element;\nimport javax.lang.model.element.Name;\nimport javax.lang.model.element.PackageElement;\nimport javax.lang.model.element.TypeElement;\nimport javax.lang.model.util.Elements;\nimport javax.tools.FileObject;\nimport javax.tools.JavaFileObject;\nimport javax.tools.StandardLocation;\n\nimport java.io.IOException;\nimport java.io.Writer;\nimport java.util.Set;\n\n@SupportedSourceVersion(SourceVersion.RELEASE_17)\n@SupportedAnnotationTypes(\"org.issue.SimpleAnnotation\")\npublic class SimpleAnnotationProcessor extends AbstractProcessor {\n\n    @Override\n    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {\n        if (annotations.isEmpty()) {\n            return true;\n        }\n\n        // assert that commons-lang3 is on the classpath\n        try {\n            getClass().getClassLoader().loadClass(\"org.apache.commons.lang3.StringUtils\");\n        } catch (ClassNotFoundException expected) {\n            throw new RuntimeException(\"Expected org.apache.commons.lang3.StringUtils to be on the processorpath,\"\n                    + \"because it is a declared dependency of the annotation processor.\");\n        }\n\n        // assert that commons-io is NOT on the classpath, as it is only a project dependency in \"annotation-user\"\n        try {\n            getClass().getClassLoader().loadClass(\"org.apache.commons.io.IOUtils\");\n            throw new RuntimeException(\"Expected a ClassNotFoundException because \"\n                    + \"org.apache.commons.io.IOUtils is not supposed to be on the processorpath.\");\n        } catch (ClassNotFoundException expected) {\n            // expected.\n        }\n\n        Filer filer = processingEnv.getFiler();\n        Elements elementUtils = processingEnv.getElementUtils();\n        Set<? extends Element> elements =\n                roundEnv.getElementsAnnotatedWith(annotations.iterator().next());\n\n        for (Element element : elements) {\n            Name name = element.getSimpleName();\n            PackageElement packageElement = elementUtils.getPackageOf(element);\n            try {\n                Name packageName = packageElement.getQualifiedName();\n                FileObject resource =\n                        filer.createResource(StandardLocation.SOURCE_OUTPUT, packageName, name + \".txt\", element);\n\n                Writer writer = resource.openWriter();\n                writer.write(name.toString());\n                writer.close();\n\n                String className = name + \"Companion\";\n                JavaFileObject javaFile = filer.createSourceFile(packageName + \".\" + className, element);\n\n                Writer javaWriter = javaFile.openWriter();\n                javaWriter.append(\"package \").append(packageName).append(\";\\n\\n\");\n                javaWriter.append(\"public class \").append(className).append(\" {\\n\");\n                javaWriter.append(\"    public \").append(className).append(\"() {\\n\");\n                javaWriter.append(\"        System.out.println(\\\"Hey there!\\\");\\n\");\n                javaWriter.append(\"    }\\n}\\n\");\n                javaWriter.close();\n            } catch (IOException e) {\n                throw new RuntimeException(e);\n            }\n        }\n        return !elements.isEmpty();\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-203-processorpath/annotation-user/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\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>compiler-test</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>annotation-user</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>commons-io</groupId>\n      <artifactId>commons-io</artifactId>\n      <version>2.14.0</version>\n    </dependency>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <annotationProcessors>\n            <annotationProcessor>org.issue.SimpleAnnotationProcessor</annotationProcessor>\n          </annotationProcessors>\n          <annotationProcessorPaths>\n            <path>\n              <groupId>org.apache.maven.plugins.compiler.it</groupId>\n              <artifactId>annotation-processor</artifactId>\n              <version>1.0-SNAPSHOT</version>\n            </path>\n          </annotationProcessorPaths>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>annotation-verify-plugin</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n        <executions>\n          <execution>\n            <id>verify-annotations</id>\n            <goals>\n              <goal>read-source</goal>\n            </goals>\n            <configuration>\n              <sourceClass>org.issue.SimpleObject</sourceClass>\n              <testSourceClass>org.issue.SimpleTestObject</testSourceClass>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-203-processorpath/annotation-user/src/main/java/org/issue/SimpleAnnotation.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.issue;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n@Target(ElementType.TYPE)\n@Retention(RetentionPolicy.SOURCE)\npublic @interface SimpleAnnotation {}\n"
  },
  {
    "path": "src/it/MCOMPILER-203-processorpath/annotation-user/src/main/java/org/issue/SimpleObject.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.issue;\n\n@SimpleAnnotation\npublic class SimpleObject {}\n"
  },
  {
    "path": "src/it/MCOMPILER-203-processorpath/annotation-user/src/test/java/org/issue/SimpleTestObject.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.issue;\n\n@SimpleAnnotation\npublic class SimpleTestObject {}\n"
  },
  {
    "path": "src/it/MCOMPILER-203-processorpath/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=process-test-classes\ninvoker.goals.2=process-test-classes\n"
  },
  {
    "path": "src/it/MCOMPILER-203-processorpath/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>compiler-test</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <modules>\n    <module>annotation-processor</module>\n    <module>annotation-user</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>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-205/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>MCOMPILER-205</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <createMissingPackageInfoClass>true</createMissingPackageInfoClass>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-205/src/main/java/dummy/HelloWorld.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 dummy;\n\npublic class HelloWorld {\n    public static void main(String[] argv) {\n        System.out.println(\"Hello World\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-205/src/main/java/dummy/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 the package javadoc\n */\npackage dummy;\n"
  },
  {
    "path": "src/it/MCOMPILER-205/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 */\ndef packageInfoClassFile = new File( basedir, 'target/classes/dummy/package-info.class' )\nassert packageInfoClassFile.exists()\n"
  },
  {
    "path": "src/it/MCOMPILER-224/annotation-processor/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\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>compiler-test</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>annotation-processor</artifactId>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-224/annotation-processor/src/main/java/org/issue/MCompiler224.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.issue;\n\npublic @interface MCompiler224 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-224/annotation-processor/src/main/java/org/issue/MCompiler224AnnotationProcessor.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.issue;\n\nimport javax.annotation.processing.AbstractProcessor;\nimport javax.annotation.processing.Messager;\nimport javax.annotation.processing.RoundEnvironment;\nimport javax.annotation.processing.SupportedAnnotationTypes;\nimport javax.annotation.processing.SupportedSourceVersion;\nimport javax.lang.model.SourceVersion;\nimport javax.lang.model.element.TypeElement;\nimport javax.tools.Diagnostic.Kind;\n\nimport java.util.Set;\n\n/* @formatter:off */\n@SupportedAnnotationTypes({\"org.issue.MCompiler224\"})\n/* @formatter:on */\n@SupportedSourceVersion(SourceVersion.RELEASE_17)\npublic class MCompiler224AnnotationProcessor extends AbstractProcessor {\n\n    @Override\n    public boolean process(final Set<? extends TypeElement> elts, final RoundEnvironment env) {\n        if (!elts.isEmpty()) {\n            final Messager messager = processingEnv.getMessager();\n            for (final Kind kind : Kind.values()) {\n                if (Kind.ERROR != kind) {\n                    System.out.println(\"Testing message for: \" + kind);\n                    messager.printMessage(kind, kind + \" Test message.\");\n                }\n            }\n        }\n        return true;\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-224/annotation-user/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\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>compiler-test</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>annotation-user</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>annotation-processor</artifactId>\n      <version>1.0-SNAPSHOT</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        <configuration>\n          <showWarnings>true</showWarnings>\n          <annotationProcessors>\n            <annotationProcessor>org.issue.MCompiler224AnnotationProcessor</annotationProcessor>\n          </annotationProcessors>\n        </configuration>\n        <dependencies>\n          <dependency>\n            <groupId>org.apache.maven.plugins.compiler.it</groupId>\n            <artifactId>annotation-processor</artifactId>\n            <version>1.0-SNAPSHOT</version>\n          </dependency>\n        </dependencies>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-224/annotation-user/src/main/java/org/issue/user/User.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.issue.user;\n\nimport org.issue.MCompiler224;\n\n@MCompiler224\npublic class User {}\n"
  },
  {
    "path": "src/it/MCOMPILER-224/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>compiler-test</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <modules>\n    <module>annotation-processor</module>\n    <module>annotation-user</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>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-224/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 */\ndef log = new File( basedir, 'build.log').text\n\ndef noteExists = log.contains(\"[INFO] NOTE Test message.\")\ndef otherExists =  log.contains(\"[INFO] OTHER Test message.\")\ndef warningExists = log.contains(\"[WARNING] WARNING Test message.\")\ndef mandatoryWarningExists = log.contains(\"[WARNING] MANDATORY_WARNING Test message.\")\n\ndef fail = false\ndef messages = \"The following assertions were violated:\"\nif ( !noteExists ){\n    messages += \"\\nNOTE message not logged in INFO level!\"\n    fail = true\n}\n\nif ( !otherExists ){\n    messages += \"\\nOTHER message not logged in INFO level!\"\n    fail = true\n}\n\nif ( !warningExists ){\n    messages += \"\\nWARNING message not logged in WARNING level!\"\n    fail = true\n}\n\nif ( !mandatoryWarningExists ){\n    messages += \"\\nMANDATORY_WARNING message not logged in WARNING level!\"\n    fail = true\n}\n\nif ( fail ){\n    throw new RuntimeException( messages )\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-228/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler228</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <url>https://issues.apache.org/jira/browse/MCOMPILER-228</url>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-228/src/main/java/example/FinalExample.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 example;\n\nimport java.util.Comparator;\n\npublic class FinalExample {\n    public static final Comparator<String> comparator = (o1, o2) -> {\n        final String desc1 = o1;\n        final String desc2 = o2;\n        final int compareTo;\n        if (desc1 == null) {\n            compareTo = -1;\n        } else if (desc2 == null) {\n            compareTo = 1;\n        } else {\n            compareTo = desc1.compareTo(desc2);\n        }\n        if (compareTo == 0) {\n            return 3;\n        }\n        return compareTo;\n    };\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-260_customArguments/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler260</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <url>https://issues.apache.org/jira/browse/MCOMPILER-260</url>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <compilerArgs>\n            <arg>-Xmaxwarns</arg>\n            <arg>7</arg>\n            <arg>-Xmaxerrs</arg>\n            <arg>7</arg>\n          </compilerArgs>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-260_customArguments/src/main/java/com/foo/MyClass.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 com.foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/MCOMPILER-268_modulepath/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler270</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.commons</groupId>\n      <artifactId>commons-lang3</artifactId>\n      <version>3.18.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>@project.version@</version>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-268_modulepath/src/main/java/com/foo/MyClass.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 com.foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/MCOMPILER-268_modulepath/src/main/java/module-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\nmodule M.N {\n    requires org.apache.commons.lang3;\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-268_modulepath/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 */\ndef cmd = new File(basedir, 'target/javac.args').text\nassert cmd.count(\"--module-path\") == 1\n\ndef descriptor = java.lang.module.ModuleFinder.of(basedir.toPath().resolve(\"target/classes\")).find( \"M.N\" ).get().descriptor()\nassert '1.0-SNAPSHOT' == descriptor.version().get() as String\nassert 'M.N@1.0-SNAPSHOT' == descriptor.toNameAndVersion()\n"
  },
  {
    "path": "src/it/MCOMPILER-270_release/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler270</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <url>https://issues.apache.org/jira/browse/MCOMPILER-270</url>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <release>${java.specification.version}</release>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-270_release/src/main/java/MyClass.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 foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/MCOMPILER-270_release/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 */\ndef cmd = new File(basedir, 'target/javac.args').text\nassert cmd.count(\"--release\") == 1\n\nassert !( cmd =~  /\\s-source\\s/ )\nassert !( cmd =~  /\\s-target\\s/ )\n"
  },
  {
    "path": "src/it/MCOMPILER-272/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 = compile\n"
  },
  {
    "path": "src/it/MCOMPILER-272/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler-272</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <modules>\n    <module>processor1</module>\n    <module>processor2</module>\n    <module>processor2-dep</module>\n    <module>project</module>\n  </modules>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-272/processor1/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler-272</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>processor1</artifactId>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <configuration>\n            <proc>none</proc>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-272/processor1/src/main/java/processor1/Processor1.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 processor1;\n\nimport javax.annotation.processing.AbstractProcessor;\nimport javax.annotation.processing.RoundEnvironment;\nimport javax.annotation.processing.SupportedAnnotationTypes;\nimport javax.lang.model.element.TypeElement;\n\nimport java.util.Set;\n\n@SupportedAnnotationTypes({\"java.lang.SuppressWarnings\"})\npublic class Processor1 extends AbstractProcessor {\n    @Override\n    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {\n        System.out.println(\"Run processor1\");\n        return false;\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-272/processor1/src/main/resources/META-INF/services/javax.annotation.processing.Processor",
    "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\nprocessor1.Processor1\n"
  },
  {
    "path": "src/it/MCOMPILER-272/processor2/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler-272</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>processor2</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>processor1</artifactId>\n      <version>${project.version}</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>processor2-dep</artifactId>\n      <version>${project.version}</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <configuration>\n            <proc>none</proc>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-272/processor2/src/main/java/processor2/Processor2.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 processor2;\n\nimport javax.annotation.processing.AbstractProcessor;\nimport javax.annotation.processing.RoundEnvironment;\nimport javax.annotation.processing.SupportedAnnotationTypes;\nimport javax.lang.model.element.TypeElement;\n\nimport java.util.Set;\n\n@SupportedAnnotationTypes({\"java.lang.SuppressWarnings\"})\npublic class Processor2 extends AbstractProcessor {\n    @Override\n    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {\n        System.out.println(\"Run processor2\");\n        new processor2.dep.Foo();\n        return false;\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-272/processor2/src/main/resources/META-INF/services/javax.annotation.processing.Processor",
    "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\nprocessor2.Processor2\n"
  },
  {
    "path": "src/it/MCOMPILER-272/processor2-dep/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler-272</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>processor2-dep</artifactId>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-272/processor2-dep/src/main/java/processor2/dep/Foo.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 processor2.dep;\n\npublic class Foo {}\n"
  },
  {
    "path": "src/it/MCOMPILER-272/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<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.compiler.it</groupId>\n    <artifactId>mcompiler-272</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>project</artifactId>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <configuration>\n            <annotationProcessorPaths>\n              <path>\n                <groupId>org.apache.maven.plugins.compiler.it</groupId>\n                <artifactId>processor1</artifactId>\n                <version>${project.version}</version>\n              </path>\n              <path>\n                <groupId>org.apache.maven.plugins.compiler.it</groupId>\n                <artifactId>processor2</artifactId>\n                <version>${project.version}</version>\n              </path>\n            </annotationProcessorPaths>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-272/project/src/main/java/project/Project.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 project;\n\nimport java.util.List;\n\npublic class Project {\n    @SuppressWarnings(\"rawtypes\")\n    public void foo(List toto) {}\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-275_separate-moduleinfo/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler270</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <url>https://issues.apache.org/jira/browse/MCOMPILER-270</url>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\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  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>default-compile</id>\n            <!-- compile everything to ensure module-info contains right entries -->\n            <configuration>\n              <release>17</release>\n            </configuration>\n          </execution>\n          <execution>\n            <id>base-compile</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <excludes>\n                <exclude>module-info.java</exclude>\n              </excludes>\n              <release>16</release>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-275_separate-moduleinfo/src/main/java/com/foo/MyClass.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 com.foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/MCOMPILER-275_separate-moduleinfo/src/main/java/module-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 */\nmodule M.N {}\n"
  },
  {
    "path": "src/it/MCOMPILER-275_separate-moduleinfo/src/test/java/com/foo/MyTest.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 com.foo;\n\nimport org.junit.jupiter.api.Test;\n\nimport static org.junit.jupiter.api.Assertions.assertTrue;\n\npublic class MyTest {\n    private MyClass myClass = new MyClass();\n\n    @Test\n    public void testApp() {\n        assertTrue(true);\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-275_separate-moduleinfo/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 */\ndef log = new File( basedir, 'build.log').text\n\n// major_version: 60 = java 16 -> execution id \"base-compile\"\nassert new File( basedir, 'target/classes/com/foo/MyClass.class' ).bytes[7] == 60\n// major_version: 61 = java 17 -> execution id \"default-compile\"\nassert new File( basedir, 'target/classes/module-info.class' ).bytes[7] == 61\n"
  },
  {
    "path": "src/it/MCOMPILER-284/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler284</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <url>https://issues.apache.org/jira/browse/MCOMPILER-284</url>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\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  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <skipMain>true</skipMain>\n          <skip>true</skip>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-284/src/main/java/com/foo/MyClass.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 com.foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/MCOMPILER-284/src/test/java/com/foo/MyTest.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 com.foo;\n\nimport org.junit.jupiter.api.Test;\n\nimport static org.junit.jupiter.api.Assertions.assertTrue;\n\npublic class MyTest {\n    private MyClass myClass = new MyClass();\n\n    @Test\n    public void testApp() {\n        assertTrue(true);\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-284/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.*;\n\nFile mainClass = new File( basedir, \"target/classes/com/foo/MyClass.class\" );\nif ( mainClass.isFile() )\n{\n    System.out.println( \"Main class is present but was skipped: \" + mainClass );\n    return false;\n}\n\nFile testClass = new File( basedir, \"target/test-classes/com/foo/MyTest.class\" );\nif ( testClass.isFile() )\n{\n    System.out.println( \"Test class is present but was skipped: \" + testClass );\n    return false;\n}\n\nreturn true;\n"
  },
  {
    "path": "src/it/MCOMPILER-294/app/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler294</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>app</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>lib</artifactId>\n      <version>1.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-294/app/src/main/java/module-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\nmodule org.maven.test.app {\n    requires org.maven.test.lib;\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-294/app/src/main/java/org/maven/test/app/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.maven.test.app;\n\nimport org.maven.test.lib.Sout;\n\npublic class Main {\n\n    /**\n     * @param args\n     */\n    public static void main(String[] args) {\n        Sout.println(args);\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-294/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 = compile\n"
  },
  {
    "path": "src/it/MCOMPILER-294/lib/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler294</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>lib</artifactId>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-294/lib/src/main/java/module-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\nmodule org.maven.test.lib {\n    exports org.maven.test.lib;\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-294/lib/src/main/java/org/maven/test/lib/Sout.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.maven.test.lib;\n\npublic class Sout {\n\n    /**\n     * @param args\n     */\n    public static void println(String[] args) {\n        for (String string : args) {\n            System.out.println(args);\n        }\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-294/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler294</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <url>https://issues.apache.org/jira/browse/MCOMPILER-294</url>\n\n  <modules>\n    <module>lib</module>\n    <module>app</module>\n  </modules>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-298/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 = test\n"
  },
  {
    "path": "src/it/MCOMPILER-298/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler298</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <url>https://issues.apache.org/jira/browse/MCOMPILER-298</url>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.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-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <parameters>true</parameters>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-298/src/main/java/com/foo/ParameterClass.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 com.foo;\n\npublic class ParameterClass {\n    public void method(String parameterName) {\n        // nothing\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-298/src/test/java/com/foo/ParameterTest.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 com.foo;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\npublic class ParameterTest {\n\n    @Test\n    public void testParameter() throws Exception {\n        assertEquals(\n                \"parameterName\",\n                ParameterClass.class\n                        .getMethod(\"method\", String.class)\n                        .getParameters()[0]\n                        .getName());\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-321_pathexceptions/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler321</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <url>https://issues.apache.org/jira/browse/MCOMPILER-321</url>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>jdom</groupId>\n      <artifactId>jdom</artifactId>\n      <version>1.0</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.geronimo.specs</groupId>\n      <artifactId>geronimo-servlet_2.4_spec</artifactId>\n      <version>1.1.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>@project.version@</version>\n        <configuration>\n          <!--\n            Normally, the following arguments should not be provided. Instead, an automatic module name\n            should be used in the `module-info.java` file. However, this is not possible for the JAR in\n            this test because they have invalid module name or they have classes in the root package.\n            But it is nevertheless possible to build the project with the dependency on the classpath\n            and this `add-reads` option. The compiler plugin do not have this option automatically for\n            the main classes as a matter of policy.\n          -->\n          <compilerArgs>\n            <arg>--add-reads</arg>\n            <arg>M.N=ALL-UNNAMED</arg>\n          </compilerArgs>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-321_pathexceptions/src/main/java/module-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\nmodule M.N {}\n"
  },
  {
    "path": "src/it/MCOMPILER-321_pathexceptions/src/test/java/test/MyTest.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 test;\n\nimport org.jdom.CDATA;\n\npublic class MyTest {\n    public static void main(String[] args) {\n        CDATA.class.getName();\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-321_pathexceptions/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\n/*\n * A previous version of this test was looking for the following warnings in the logs:\n *\n *    - Can't extract module name from geronimo-servlet_2.4_spec-1.1.1.jar\n *      (because of invalid module name: '2' is not a Java identifier)\n *\n *    - Can't extract module name from jdom-1.0.jar\n *      (because of JDOMAbout.class found in top-level directory while unnamed package not allowed in module)\n *\n * Those warnings do not happen anymore, even if above JARs are still invalid. However, it is nevertheless\n * possible to build the project with the dependency on the classpath and an `--add-reads` option.\n * We verify by ensuring that the test file, which use JDOM, has been compiled.\n */\ndef targetFile = new File( basedir, 'target/test-classes/test/MyTest.class')\nassert targetFile.exists()\n"
  },
  {
    "path": "src/it/MCOMPILER-328_multiReleaseOutput/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler328</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <release>17</release>\n          <multiReleaseOutput>true</multiReleaseOutput>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-328_multiReleaseOutput/src/main/java/MyClass.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 foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/MCOMPILER-328_multiReleaseOutput/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/classes/foo/MyClass.class').exists()\nassert  new File( basedir, 'target/classes/META-INF/versions/17/foo/MyClass.class').exists()\n"
  },
  {
    "path": "src/it/MCOMPILER-336_incremental-modulepath/a/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.compiler.it</groupId>\n    <artifactId>mcompiler336</artifactId>\n    <version>1</version>\n  </parent>\n  <artifactId>a</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-336_incremental-modulepath/a/src/main/java/module-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 */\nmodule test.a {}\n"
  },
  {
    "path": "src/it/MCOMPILER-336_incremental-modulepath/b/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.compiler.it</groupId>\n    <artifactId>mcompiler336</artifactId>\n    <version>1</version>\n  </parent>\n  <artifactId>b</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>a</artifactId>\n      <version>1.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/module-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 */\nmodule test.b {\n    requires transitive test.a;\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/test/Foo.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.opengis.annotation;\n\npublic class Foo {}\n"
  },
  {
    "path": "src/it/MCOMPILER-336_incremental-modulepath/b/src/main/java/test/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 */\npackage org.opengis.annotation;\n"
  },
  {
    "path": "src/it/MCOMPILER-336_incremental-modulepath/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 = verify\ninvoker.goals.2 = verify\n"
  },
  {
    "path": "src/it/MCOMPILER-336_incremental-modulepath/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler336</artifactId>\n  <version>1</version>\n  <packaging>pom</packaging>\n\n  <modules>\n    <module>a</module>\n    <module>b</module>\n  </modules>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <useIncrementalCompilation>false</useIncrementalCompilation>\n          <!-- https://issues.apache.org/jira/browse/MCOMPILER-209 -->\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-349_dependencyChanged/dependent-module/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler349-test</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>dependent-module</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>service</artifactId>\n      <version>1.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-349_dependencyChanged/dependent-module/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 */\npackage foo;\n\npublic class Main {\n    public static void main(String[] args) {\n        TestService testService = new TestService();\n        testService.run();\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-349_dependencyChanged/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 compile\ninvoker.goals.2 = groovy:execute\ninvoker.goals.3 = compile\ninvoker.buildResult.3 = failure\n"
  },
  {
    "path": "src/it/MCOMPILER-349_dependencyChanged/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler349-test</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <description>IT test to verify that dependent-module is recompiled when\n    `mvn compile` is executed without `mvn clean` while a module dependency has changed.\n    The compilation should fail as dependent-module uses a method that no longer exists\n    (run() method of TestService renamed to newMethodName()).</description>\n\n  <modules>\n    <module>dependent-module</module>\n    <module>service</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>@project.version@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.codehaus.gmaven</groupId>\n          <artifactId>groovy-maven-plugin</artifactId>\n          <version>2.1.1</version>\n          <configuration>\n            <source>def fileToModify = new File(project.basedir, 'service/src/main/java/TestService.java')\n              processFileInplace(fileToModify) { text -&gt;\n                text.replaceAll(/run/, 'newMethodName')\n              }\n\n              def processFileInplace(file, Closure processText) {\n                file.write(processText(file.text))\n              }</source>\n          </configuration>\n          <dependencies>\n            <dependency>\n              <groupId>org.codehaus.groovy</groupId>\n              <artifactId>groovy-all</artifactId>\n              <version>2.4.21</version>\n            </dependency>\n          </dependencies>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-349_dependencyChanged/service/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler349-test</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>service</artifactId>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-349_dependencyChanged/service/src/main/java/TestService.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 foo;\n\npublic class TestService {\n\n    public void run() {}\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-349_dependencyChanged/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 */\ndef logFile = new File( basedir, 'build.log' )\nassert logFile.exists()\ncontent = logFile.text\n\nassert content.contains( 'COMPILATION ERROR:' )\nassert content.contains( 'CompilationFailureException' ) // In debug level logs.\n"
  },
  {
    "path": "src/it/MCOMPILER-360/dep360/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler360</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>dep360</artifactId>\n  <packaging>pom</packaging>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-360/main360/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler360</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>main360</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>dep360</artifactId>\n      <version>1.0-SNAPSHOT</version>\n      <type>pom</type>\n    </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-360/main360/src/main/java/module-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\nmodule org.maven.test.app {}\n"
  },
  {
    "path": "src/it/MCOMPILER-360/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler360</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <url>https://issues.apache.org/jira/browse/MCOMPILER-360</url>\n\n  <modules>\n    <module>dep360</module>\n    <module>main360</module>\n  </modules>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-366/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler-366</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.codehaus.plexus</groupId>\n      <artifactId>plexus-utils</artifactId>\n      <version>3.0.24</version>\n      <type>modular-jar</type>\n      <!-- Force placement on the module-path. -->\n    </dependency>\n    <dependency>\n      <groupId>org.codehaus.plexus</groupId>\n      <artifactId>plexus-resources</artifactId>\n      <version>1.1.0</version>\n      <type>modular-jar</type>\n      <!-- Force placement on the module-path. -->\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-366/src/main/java/module-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 */\nmodule lib {\n    requires plexus.utils;\n    requires plexus.resources;\n\n    exports org.maven.test;\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-366/src/main/java/org/maven/test/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.maven.test;\n\nimport org.codehaus.plexus.resource.ResourceManager;\nimport org.codehaus.plexus.util.StringUtils;\n\npublic class Main {\n\n    /**\n     * @param args\n     */\n    public static void main(String[] args) {\n        System.out.println(StringUtils.concatenate(args));\n        ResourceManager manager = null;\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-366/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\nbuildLog = new File( basedir, 'build.log' ).text;\n\nassert buildLog.contains(\"[WARNING] Filename-based automodules detected on the module path:\")\nassert buildLog.contains(\"  - plexus-utils-3.0.24.jar\")\nassert buildLog.contains(\"  - plexus-resources-1.1.0.jar\")\n"
  },
  {
    "path": "src/it/MCOMPILER-373_mrjar/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler373</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <release>15</release>\n        </configuration>\n        <!-- define the possible compilations -->\n        <executions>\n          <!-- Pseudo-Java 9 (actually using a more recent version for avoiding unsupported versions) -->\n          <execution>\n            <id>java9</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <phase>compile</phase>\n            <configuration>\n              <release>16</release>\n              <compileSourceRoots>\n                <compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>\n              </compileSourceRoots>\n              <multiReleaseOutput>true</multiReleaseOutput>\n            </configuration>\n          </execution>\n          <!-- Pseudo-Java 11 (actually using a more recent version for avoiding unsupported versions) -->\n          <execution>\n            <id>java11</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <phase>compile</phase>\n            <configuration>\n              <release>17</release>\n              <compileSourceRoots>\n                <compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot>\n              </compileSourceRoots>\n              <multiReleaseOutput>true</multiReleaseOutput>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-373_mrjar/src/main/java/org/maven/bug/A.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.maven.bug;\n\npublic class A {\n    static int getCount() {\n        return 1;\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-373_mrjar/src/main/java/org/maven/bug/B.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.maven.bug;\n\npublic class B {\n    static int getCount() {\n        return A.getCount() + 1;\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-373_mrjar/src/main/java11/org/maven/bug/B.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.maven.bug;\n\npublic class B {\n    int getCount() {\n        return A9.getCount() + 2;\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-373_mrjar/src/main/java9/org/maven/bug/A9.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.maven.bug;\n\npublic class A9 {\n    static int getCount() {\n        return A.getCount() + 1;\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-373_mrjar/src/main/java9/org/maven/bug/B.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.maven.bug;\n\npublic class B {\n    static int getCount() {\n        return A9.getCount() + 1;\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-379/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 = compile\n"
  },
  {
    "path": "src/it/MCOMPILER-379/module1/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler-379</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>module1</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>module2</artifactId>\n      <version>${project.version}</version>\n    </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-379/module2/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler-379</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>module2</artifactId>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-379/module2/src/main/java/com/natros/mcp/Foo.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 com.natros.mcp;\n\npublic class Foo {}\n"
  },
  {
    "path": "src/it/MCOMPILER-379/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler-379</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <modules>\n    <module>module1</module>\n    <module>module2</module>\n  </modules>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-api/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.compiler.it</groupId>\n    <artifactId>mcompiler391-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler391-annotation-api</artifactId>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-api/src/main/java/mcompiler391/SimpleAnnotation.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 mcompiler391;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n@Target(ElementType.TYPE)\n@Retention(RetentionPolicy.SOURCE)\npublic @interface SimpleAnnotation {\n    /**\n     * Specifies which class (FQCN) is supposed to be on classpath during annotation processing.\n     * Used to check if the dependency resolution mechanism of maven-compiler-plugin is constructing\n     * the classpath (processorpath) correctly, based on the plugin configuration and dependency management.\n     */\n    String onClasspath() default \"\";\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-processor/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.compiler.it</groupId>\n    <artifactId>mcompiler391-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler391-annotation-processor</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>mcompiler391-annotation-api</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n    </dependency>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>mcompiler391-annotation-processor-dep</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-processor/src/main/java/mcompiler391/SimpleAnnotationProcessor.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 mcompiler391;\n\nimport javax.annotation.processing.AbstractProcessor;\nimport javax.annotation.processing.Filer;\nimport javax.annotation.processing.RoundEnvironment;\nimport javax.annotation.processing.SupportedAnnotationTypes;\nimport javax.annotation.processing.SupportedSourceVersion;\nimport javax.lang.model.SourceVersion;\nimport javax.lang.model.element.Element;\nimport javax.lang.model.element.Name;\nimport javax.lang.model.element.PackageElement;\nimport javax.lang.model.element.TypeElement;\nimport javax.lang.model.util.Elements;\nimport javax.tools.FileObject;\nimport javax.tools.StandardLocation;\n\nimport java.io.IOException;\nimport java.io.Writer;\nimport java.util.Set;\n\n@SupportedSourceVersion(SourceVersion.RELEASE_17)\n@SupportedAnnotationTypes(\"mcompiler391.SimpleAnnotation\")\npublic class SimpleAnnotationProcessor extends AbstractProcessor {\n\n    @Override\n    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {\n        if (annotations.isEmpty()) {\n            return true;\n        }\n\n        Filer filer = processingEnv.getFiler();\n        Elements elementUtils = processingEnv.getElementUtils();\n        Set<? extends Element> elements =\n                roundEnv.getElementsAnnotatedWith(annotations.iterator().next());\n\n        for (Element element : elements) {\n            Name name = element.getSimpleName();\n            PackageElement packageElement = elementUtils.getPackageOf(element);\n\n            SimpleAnnotation annotation = element.getAnnotation(SimpleAnnotation.class);\n            assertThatClassIsOnClasspath(annotation.onClasspath());\n\n            try {\n                Name packageName = packageElement.getQualifiedName();\n                FileObject resource =\n                        filer.createResource(StandardLocation.SOURCE_OUTPUT, packageName, name + \".txt\", element);\n\n                Writer writer = resource.openWriter();\n                writer.write(name.toString());\n                writer.close();\n            } catch (IOException e) {\n                throw new RuntimeException(e);\n            }\n        }\n        return !elements.isEmpty();\n    }\n\n    private void assertThatClassIsOnClasspath(String fqcn) {\n        try {\n            getClass().getClassLoader().loadClass(fqcn);\n        } catch (ClassNotFoundException cnfe) {\n            String msg =\n                    String.format(\"Expected class '%s' to be on the classpath (processorpath), but it wasn't.\", fqcn);\n            throw new RuntimeException(msg, cnfe);\n        }\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-processor-dep-v1/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.compiler.it</groupId>\n    <artifactId>mcompiler391-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler391-annotation-processor-dep</artifactId>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-processor-dep-v1/src/main/java/mcompiler391/AnnotationProcessorDependencyV1.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 mcompiler391;\n\npublic class AnnotationProcessorDependencyV1 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-processor-dep-v2/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.compiler.it</groupId>\n    <artifactId>mcompiler391-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <!-- Same groupId + artifactId as for v1 (1.0.0-SNAPSHOT), but different version to test version overrides\n       via dependency management -->\n  <artifactId>mcompiler391-annotation-processor-dep</artifactId>\n  <version>2.0.0-SNAPSHOT</version>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-processor-dep-v2/src/main/java/mcompiler391/AnnotationProcessorDependencyV2.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 mcompiler391;\n\npublic class AnnotationProcessorDependencyV2 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-user1/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.compiler.it</groupId>\n    <artifactId>mcompiler391-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler391-annotation-user1</artifactId>\n  <name>Annotation processor version from depMgmt + useDepMgmt=false</name>\n\n  <dependencyManagement>\n    <dependencies>\n      <dependency>\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>mcompiler391-annotation-processor</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n      </dependency>\n    </dependencies>\n  </dependencyManagement>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>mcompiler391-annotation-api</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <annotationProcessors>\n            <annotationProcessor>mcompiler391.SimpleAnnotationProcessor</annotationProcessor>\n          </annotationProcessors>\n          <annotationProcessorPaths>\n            <path>\n              <groupId>org.apache.maven.plugins.compiler.it</groupId>\n              <artifactId>mcompiler391-annotation-processor</artifactId>\n            </path>\n          </annotationProcessorPaths>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>annotation-verify-plugin</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n        <executions>\n          <execution>\n            <id>verify-annotations</id>\n            <goals>\n              <goal>read-source</goal>\n            </goals>\n            <phase>process-test-classes</phase>\n            <configuration>\n              <sourceClass>mcompiler391.SimpleObject1</sourceClass>\n              <testSourceClass>mcompiler391.SimpleTestObject1</testSourceClass>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-user1/src/main/java/mcompiler391/SimpleObject1.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 mcompiler391;\n\n@SimpleAnnotation(onClasspath = \"mcompiler391.AnnotationProcessorDependencyV1\")\npublic class SimpleObject1 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-user1/src/test/java/mcompiler391/SimpleTestObject1.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 mcompiler391;\n\n@SimpleAnnotation(onClasspath = \"mcompiler391.AnnotationProcessorDependencyV1\")\npublic class SimpleTestObject1 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-user2/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.compiler.it</groupId>\n    <artifactId>mcompiler391-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler391-annotation-user2</artifactId>\n  <name>Annotation processor version from depMgmt + useDepMgmt=true</name>\n\n  <dependencyManagement>\n    <dependencies>\n      <dependency>\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>mcompiler391-annotation-processor</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n      </dependency>\n      <dependency>\n        <!-- Overrides the version defined by mcompiler391-annotation-processor itself -->\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>mcompiler391-annotation-processor-dep</artifactId>\n        <version>2.0.0-SNAPSHOT</version>\n      </dependency>\n    </dependencies>\n  </dependencyManagement>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>mcompiler391-annotation-api</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <annotationProcessors>\n            <annotationProcessor>mcompiler391.SimpleAnnotationProcessor</annotationProcessor>\n          </annotationProcessors>\n          <annotationProcessorPathsUseDepMgmt>true</annotationProcessorPathsUseDepMgmt>\n          <annotationProcessorPaths>\n            <path>\n              <groupId>org.apache.maven.plugins.compiler.it</groupId>\n              <artifactId>mcompiler391-annotation-processor</artifactId>\n            </path>\n          </annotationProcessorPaths>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>annotation-verify-plugin</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n        <executions>\n          <execution>\n            <id>verify-annotations</id>\n            <goals>\n              <goal>read-source</goal>\n            </goals>\n            <phase>process-test-classes</phase>\n            <configuration>\n              <sourceClass>mcompiler391.SimpleObject2</sourceClass>\n              <testSourceClass>mcompiler391.SimpleTestObject2</testSourceClass>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-user2/src/main/java/mcompiler391/SimpleObject2.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 mcompiler391;\n\n@SimpleAnnotation(onClasspath = \"mcompiler391.AnnotationProcessorDependencyV2\")\npublic class SimpleObject2 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-user2/src/test/java/mcompiler391/SimpleTestObject2.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 mcompiler391;\n\n@SimpleAnnotation(onClasspath = \"mcompiler391.AnnotationProcessorDependencyV2\")\npublic class SimpleTestObject2 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-user3/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.compiler.it</groupId>\n    <artifactId>mcompiler391-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler391-annotation-user3</artifactId>\n  <name>Annotation processor version explicitly set + useDepMgmt=false</name>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>mcompiler391-annotation-api</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <annotationProcessors>\n            <annotationProcessor>mcompiler391.SimpleAnnotationProcessor</annotationProcessor>\n          </annotationProcessors>\n          <annotationProcessorPaths>\n            <path>\n              <groupId>org.apache.maven.plugins.compiler.it</groupId>\n              <artifactId>mcompiler391-annotation-processor</artifactId>\n              <version>1.0.0-SNAPSHOT</version>\n            </path>\n          </annotationProcessorPaths>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>annotation-verify-plugin</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n        <executions>\n          <execution>\n            <id>verify-annotations</id>\n            <goals>\n              <goal>read-source</goal>\n            </goals>\n            <phase>process-test-classes</phase>\n            <configuration>\n              <sourceClass>mcompiler391.SimpleObject3</sourceClass>\n              <testSourceClass>mcompiler391.SimpleTestObject3</testSourceClass>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-user3/src/main/java/mcompiler391/SimpleObject3.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 mcompiler391;\n\n@SimpleAnnotation(onClasspath = \"mcompiler391.AnnotationProcessorDependencyV1\")\npublic class SimpleObject3 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-user3/src/test/java/mcompiler391/SimpleTestObject3.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 mcompiler391;\n\n@SimpleAnnotation(onClasspath = \"mcompiler391.AnnotationProcessorDependencyV1\")\npublic class SimpleTestObject3 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-user4/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.compiler.it</groupId>\n    <artifactId>mcompiler391-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler391-annotation-user4</artifactId>\n  <name>Annotation processor version explicitly set + useDepMgmt=true</name>\n\n  <dependencyManagement>\n    <dependencies>\n      <dependency>\n        <!-- Overrides the version defined by mcompiler391-annotation-processor itself -->\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>mcompiler391-annotation-processor-dep</artifactId>\n        <version>2.0.0-SNAPSHOT</version>\n      </dependency>\n    </dependencies>\n  </dependencyManagement>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>mcompiler391-annotation-api</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <annotationProcessors>\n            <annotationProcessor>mcompiler391.SimpleAnnotationProcessor</annotationProcessor>\n          </annotationProcessors>\n          <annotationProcessorPathsUseDepMgmt>true</annotationProcessorPathsUseDepMgmt>\n          <annotationProcessorPaths>\n            <path>\n              <groupId>org.apache.maven.plugins.compiler.it</groupId>\n              <artifactId>mcompiler391-annotation-processor</artifactId>\n              <version>1.0.0-SNAPSHOT</version>\n            </path>\n          </annotationProcessorPaths>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>annotation-verify-plugin</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n        <executions>\n          <execution>\n            <id>verify-annotations</id>\n            <goals>\n              <goal>read-source</goal>\n            </goals>\n            <phase>process-test-classes</phase>\n            <configuration>\n              <sourceClass>mcompiler391.SimpleObject4</sourceClass>\n              <testSourceClass>mcompiler391.SimpleTestObject4</testSourceClass>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-user4/src/main/java/mcompiler391/SimpleObject4.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 mcompiler391;\n\n@SimpleAnnotation(onClasspath = \"mcompiler391.AnnotationProcessorDependencyV2\")\npublic class SimpleObject4 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/annotation-user4/src/test/java/mcompiler391/SimpleTestObject4.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 mcompiler391;\n\n@SimpleAnnotation(onClasspath = \"mcompiler391.AnnotationProcessorDependencyV2\")\npublic class SimpleTestObject4 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/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=process-test-classes\n"
  },
  {
    "path": "src/it/MCOMPILER-391-processorpath-dep-mgmt/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler391-test</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <url>https://issues.apache.org/jira/browse/MCOMPILER-391</url>\n\n  <modules>\n    <module>annotation-api</module>\n    <module>annotation-processor-dep-v1</module>\n    <module>annotation-processor-dep-v2</module>\n    <module>annotation-processor</module>\n    <module>annotation-user1</module>\n    <module>annotation-user2</module>\n    <module>annotation-user3</module>\n    <module>annotation-user4</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>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor/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.compiler.it</groupId>\n    <artifactId>mcompiler395-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler395-annotation-processor</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>mcompiler395-annotation-processor-dep</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor/src/main/java/mcompiler395/SimpleAnnotationProcessor.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 mcompiler395;\n\nimport javax.annotation.processing.AbstractProcessor;\nimport javax.annotation.processing.Filer;\nimport javax.annotation.processing.RoundEnvironment;\nimport javax.annotation.processing.SupportedAnnotationTypes;\nimport javax.annotation.processing.SupportedSourceVersion;\nimport javax.lang.model.SourceVersion;\nimport javax.lang.model.element.Element;\nimport javax.lang.model.element.Name;\nimport javax.lang.model.element.PackageElement;\nimport javax.lang.model.element.TypeElement;\nimport javax.lang.model.util.Elements;\nimport javax.tools.FileObject;\nimport javax.tools.StandardLocation;\n\nimport java.io.IOException;\nimport java.io.Writer;\nimport java.util.Set;\n\n@SupportedSourceVersion(SourceVersion.RELEASE_17)\n@SupportedAnnotationTypes(\"mcompiler395.SimpleAnnotation\")\npublic class SimpleAnnotationProcessor extends AbstractProcessor {\n\n    @Override\n    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {\n        if (annotations.isEmpty()) {\n            return true;\n        }\n\n        // assert that mcompiler395-annotation-processor-dep is NOT on the processorpath, since it is excluded\n        // in the plugin configuration\n        try {\n            getClass().getClassLoader().loadClass(\"mcompiler395.AnnotationProcessorDependency\");\n            throw new RuntimeException(\"Expected a ClassNotFoundException, because \"\n                    + \"mcompiler395.AnnotationProcessorDependency is not supposed to be on the processorpath.\");\n        } catch (ClassNotFoundException expected) {\n            // expected\n        }\n\n        Filer filer = processingEnv.getFiler();\n        Elements elementUtils = processingEnv.getElementUtils();\n        Set<? extends Element> elements =\n                roundEnv.getElementsAnnotatedWith(annotations.iterator().next());\n\n        for (Element element : elements) {\n            Name name = element.getSimpleName();\n            PackageElement packageElement = elementUtils.getPackageOf(element);\n            try {\n                Name packageName = packageElement.getQualifiedName();\n                FileObject resource =\n                        filer.createResource(StandardLocation.SOURCE_OUTPUT, packageName, name + \".txt\", element);\n\n                Writer writer = resource.openWriter();\n                writer.write(name.toString());\n                writer.close();\n            } catch (IOException e) {\n                throw new RuntimeException(e);\n            }\n        }\n        return !elements.isEmpty();\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor-dep/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.compiler.it</groupId>\n    <artifactId>mcompiler395-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler395-annotation-processor-dep</artifactId>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-processor-dep/src/main/java/mcompiler395/AnnotationProcessorDependency.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 mcompiler395;\n\npublic class AnnotationProcessorDependency {}\n"
  },
  {
    "path": "src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/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.compiler.it</groupId>\n    <artifactId>mcompiler395-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler395-annotation-user</artifactId>\n\n  <build>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <annotationProcessors>\n            <annotationProcessor>mcompiler395.SimpleAnnotationProcessor</annotationProcessor>\n          </annotationProcessors>\n          <annotationProcessorPaths>\n            <path>\n              <groupId>org.apache.maven.plugins.compiler.it</groupId>\n              <artifactId>mcompiler395-annotation-processor</artifactId>\n              <version>1.0.0-SNAPSHOT</version>\n              <exclusions>\n                <exclusion>\n                  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n                  <artifactId>mcompiler395-annotation-processor-dep</artifactId>\n                </exclusion>\n              </exclusions>\n            </path>\n          </annotationProcessorPaths>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>annotation-verify-plugin</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n        <executions>\n          <execution>\n            <id>verify-annotations</id>\n            <goals>\n              <goal>read-source</goal>\n            </goals>\n            <phase>process-test-classes</phase>\n            <configuration>\n              <sourceClass>mcompiler395.SimpleObject</sourceClass>\n              <testSourceClass>mcompiler395.SimpleTestObject</testSourceClass>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/main/java/mcompiler395/SimpleAnnotation.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 mcompiler395;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n@Target(ElementType.TYPE)\n@Retention(RetentionPolicy.SOURCE)\npublic @interface SimpleAnnotation {}\n"
  },
  {
    "path": "src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/main/java/mcompiler395/SimpleObject.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 mcompiler395;\n\n@SimpleAnnotation\npublic class SimpleObject {}\n"
  },
  {
    "path": "src/it/MCOMPILER-395-processorpath-exclude-deps/annotation-user/src/test/java/mcompiler395/SimpleTestObject.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 mcompiler395;\n\n@SimpleAnnotation\npublic class SimpleTestObject {}\n"
  },
  {
    "path": "src/it/MCOMPILER-395-processorpath-exclude-deps/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=process-test-classes\n"
  },
  {
    "path": "src/it/MCOMPILER-395-processorpath-exclude-deps/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler395-test</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <modules>\n    <module>annotation-processor-dep</module>\n    <module>annotation-processor</module>\n    <module>annotation-user</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>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-474_recompile-dependent-when-package/dependent-module/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler-474-test</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>dependent-module</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>service</artifactId>\n      <version>1.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-474_recompile-dependent-when-package/dependent-module/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 */\npackage foo;\n\npublic class Main {\n    public static void main(String[] args) {\n        TestService testService = new TestService();\n        testService.run();\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-474_recompile-dependent-when-package/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.goals.2 = groovy:execute\ninvoker.goals.3 = package\ninvoker.buildResult.3 = failure\n"
  },
  {
    "path": "src/it/MCOMPILER-474_recompile-dependent-when-package/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler-474-test</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <description>Integration test to verify that dependent-module is recompiled when run 'mvn package' without 'clean'\n    if module dependency changed.\n    The compilation should fail as dependent-module uses method that no longer exists (run() method of TestService\n    renamed to newMethodName()).</description>\n\n  <modules>\n    <module>dependent-module</module>\n    <module>service</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>@project.version@</version>\n        </plugin>\n        <plugin>\n          <groupId>org.codehaus.gmaven</groupId>\n          <artifactId>groovy-maven-plugin</artifactId>\n          <version>2.1.1</version>\n          <configuration>\n            <source>def fileToModify = new File(project.basedir, 'service/src/main/java/TestService.java')\n              processFileInplace(fileToModify) { text -&gt;\n                text.replaceAll(/run/, 'newMethodName')\n              }\n\n              def processFileInplace(file, Closure processText) {\n                file.write(processText(file.text))\n              }</source>\n          </configuration>\n          <dependencies>\n            <dependency>\n              <groupId>org.codehaus.groovy</groupId>\n              <artifactId>groovy-all</artifactId>\n              <version>2.4.21</version>\n            </dependency>\n          </dependencies>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-474_recompile-dependent-when-package/service/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>mcompiler-474-test</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>service</artifactId>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-474_recompile-dependent-when-package/service/src/main/java/TestService.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 foo;\n\npublic class TestService {\n\n    public void run() {}\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-474_recompile-dependent-when-package/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 */\ndef logFile = new File( basedir, 'build.log' )\nassert logFile.exists()\ncontent = logFile.text\n\nassert content.contains( 'COMPILATION ERROR:' )\nassert content.contains( 'CompilationFailureException' ) // In debug level logs.\n"
  },
  {
    "path": "src/it/MCOMPILER-481-requires-static-included/app/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\n  <modelVersion>4.0.0</modelVersion>\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>compiler-bug</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>compiler-bug-app</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>compiler-bug-service</artifactId>\n      <version>1.0-SNAPSHOT</version>\n    </dependency>\n\n    <dependency>\n      <groupId>org.eclipse.jetty</groupId>\n      <artifactId>jetty-util-ajax</artifactId>\n      <version>10.0.7</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</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-481-requires-static-included/app/src/main/java/module-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\nmodule compiler.bug.app {\n    exports org.test.app;\n\n    requires compiler.bug.service;\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-481-requires-static-included/app/src/main/java/org/test/app/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.test.app;\n\npublic class Main {}\n"
  },
  {
    "path": "src/it/MCOMPILER-481-requires-static-included/app/src/test/java/org/test/app/MainTest.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.test.app;\n\nimport org.eclipse.jetty.util.ajax.JSON;\nimport org.junit.jupiter.api.Test;\nimport org.test.service.JSONService;\n\npublic class MainTest {\n    @Test\n    public void test() {\n        JSON json = new JSONService().json;\n        System.err.println(\"json = \" + json);\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-481-requires-static-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 verify\n"
  },
  {
    "path": "src/it/MCOMPILER-481-requires-static-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 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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>compiler-bug</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <modules>\n    <module>service</module>\n    <module>app</module>\n  </modules>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\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>@project.version@</version>\n          <configuration>\n            <release>11</release>\n            <!-- Older release required by the surefire plugin tested below. -->\n          </configuration>\n        </plugin>\n        <plugin>\n          <!-- TODO: This IT fails with surefire 3.x -->\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-surefire-plugin</artifactId>\n          <version>2.22.2</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-481-requires-static-included/service/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\n  <modelVersion>4.0.0</modelVersion>\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>compiler-bug</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>compiler-bug-service</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.eclipse.jetty</groupId>\n      <artifactId>jetty-util-ajax</artifactId>\n      <version>10.0.7</version>\n      <optional>true</optional>\n    </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-481-requires-static-included/service/src/main/java/module-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\nmodule compiler.bug.service {\n    exports org.test.service;\n\n    requires static org.eclipse.jetty.util.ajax;\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-481-requires-static-included/service/src/main/java/org/test/service/JSONService.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.test.service;\n\nimport org.eclipse.jetty.util.ajax.JSON;\n\npublic class JSONService extends Service {\n    public final JSON json = new JSON();\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-481-requires-static-included/service/src/main/java/org/test/service/Service.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.test.service;\n\npublic abstract class Service {}\n"
  },
  {
    "path": "src/it/MCOMPILER-485/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>MCOMPILER-485</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <createMissingPackageInfoClass>true</createMissingPackageInfoClass>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-485/src/main/java/dummy/HelloWorld.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 dummy;\n\npublic class HelloWorld {\n    public static void main(String[] argv) {\n        System.out.println(\"Hello World\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-485/src/main/java/dummy/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 the package javadoc\n */\npackage dummy;\n"
  },
  {
    "path": "src/it/MCOMPILER-485/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 */\ndef packageInfoClassFile = new File( basedir, 'target/classes/dummy/package-info.class' )\ndef packageInfoBytes = packageInfoClassFile.bytes\ndef packageInfoHex = packageInfoBytes.encodeHex().toString()\n// \"dummy/package-info\" hex encoded\nassert packageInfoHex.contains( '64756d6d792f7061636b6167652d696e666f' )\n"
  },
  {
    "path": "src/it/MCOMPILER-495/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\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>MCOMPILER-495</artifactId>\n  <version>1.0</version>\n  <packaging>jar</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <createMissingPackageInfoClass>true</createMissingPackageInfoClass>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-495/src/main/java/dummy/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 the package javadoc\n */\npackage dummy;\n"
  },
  {
    "path": "src/it/MCOMPILER-495/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 */\ndef packageInfoClassFile = new File( basedir, 'target/classes/dummy/package-info.class' )\ndef packageInfoBytes = packageInfoClassFile.bytes\ndef packageInfoHex = packageInfoBytes.encodeHex().toString()\n// \"dummy/package-info\" hex encoded\nassert packageInfoHex.contains( '64756d6d792f7061636b6167652d696e666f' )\n"
  },
  {
    "path": "src/it/MCOMPILER-500-package-info-incr/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 compile\ninvoker.buildResult = success\ninvoker.goals.2 =  compile\ninvoker.buildResult.2 = success\n"
  },
  {
    "path": "src/it/MCOMPILER-500-package-info-incr/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>maven-compiler-plugin-it-package-info-incr</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>jar</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <createMissingPackageInfoClass>false</createMissingPackageInfoClass>\n          <incrementalExcludes>\n            <incrementalExclude>**/package-info.java</incrementalExclude>\n          </incrementalExcludes>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/Person.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 dummy;\n\npublic class Person {\n    private long id;\n    private String name;\n\n    public long getId() {\n        return id;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/foo/Person.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 dummy.foo;\n\npublic class Person {\n    private long id;\n    private String name;\n\n    public long getId() {\n        return id;\n    }\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-500-package-info-incr/src/main/java/dummy/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 the package javadoc\n */\npackage dummy;\n"
  },
  {
    "path": "src/it/MCOMPILER-500-package-info-incr/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 */\ndef logFile = new File( basedir, 'build.log' )\nassert logFile.exists()\ncontent = logFile.text\n\nassert 0 == content.count( \"Recompiling the module because of \")\nassert 1 == content.count( 'Nothing to compile - all classes are up to date.' )\n\n\n"
  },
  {
    "path": "src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/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.compiler.it</groupId>\n    <artifactId>mcompiler503-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler503-annotation-processor</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>mcompiler503-annotation-processor-dep</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor/src/main/java/mcompiler503/SimpleAnnotationProcessor.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 mcompiler503;\n\nimport javax.annotation.processing.AbstractProcessor;\nimport javax.annotation.processing.Filer;\nimport javax.annotation.processing.RoundEnvironment;\nimport javax.annotation.processing.SupportedAnnotationTypes;\nimport javax.annotation.processing.SupportedSourceVersion;\nimport javax.lang.model.SourceVersion;\nimport javax.lang.model.element.Element;\nimport javax.lang.model.element.Name;\nimport javax.lang.model.element.PackageElement;\nimport javax.lang.model.element.TypeElement;\nimport javax.lang.model.util.Elements;\nimport javax.tools.FileObject;\nimport javax.tools.JavaFileObject;\nimport javax.tools.StandardLocation;\n\nimport java.io.IOException;\nimport java.io.Writer;\nimport java.util.Set;\n\n@SupportedSourceVersion(SourceVersion.RELEASE_17)\n@SupportedAnnotationTypes(\"mcompiler503.SimpleAnnotation\")\npublic class SimpleAnnotationProcessor extends AbstractProcessor {\n\n    @Override\n    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {\n        if (annotations.isEmpty()) {\n            return true;\n        }\n\n        // assert that mcompiler503-annotation-processor-dep:2.0.0-SNAPSHOT is on the classpath\n        try {\n            getClass().getClassLoader().loadClass(\"mcompiler503.AnnotationProcessorDependencyV2\");\n        } catch (ClassNotFoundException expected) {\n            throw new RuntimeException(\"Expected mcompiler503.AnnotationProcessorDependencyV2 to be on the\"\n                    + \"processorpath, because mcompiler503-annotation-processor-dep:2.0.0-SNAPSHOT is specifically\"\n                    + \"configured as one the elements of the processorpath.\");\n        }\n\n        // assert that mcompiler503-annotation-processor-dep:1.0.0-SNAPSHOT is NOT on the classpath,\n        // since it should be replaced by mcompiler503-annotation-processor-dep:2.0.0-SNAPSHOT\n        // when resolving annotation processors and their dependencies\n        try {\n            getClass().getClassLoader().loadClass(\"mcompiler503.AnnotationProcessorDependencyV1\");\n            throw new RuntimeException(\"Expected a ClassNotFoundException, because \"\n                    + \"mcompiler503.AnnotationProcessorDependencyV1 is not supposed to be on the processorpath.\");\n        } catch (ClassNotFoundException expected) {\n            // expected.\n        }\n\n        Filer filer = processingEnv.getFiler();\n        Elements elementUtils = processingEnv.getElementUtils();\n        Set<? extends Element> elements =\n                roundEnv.getElementsAnnotatedWith(annotations.iterator().next());\n\n        for (Element element : elements) {\n            Name name = element.getSimpleName();\n            PackageElement packageElement = elementUtils.getPackageOf(element);\n            try {\n                Name packageName = packageElement.getQualifiedName();\n                FileObject resource =\n                        filer.createResource(StandardLocation.SOURCE_OUTPUT, packageName, name + \".txt\", element);\n\n                Writer writer = resource.openWriter();\n                writer.write(name.toString());\n                writer.close();\n\n                String className = name + \"Companion\";\n                JavaFileObject javaFile = filer.createSourceFile(packageName + \".\" + className, element);\n\n                Writer javaWriter = javaFile.openWriter();\n                javaWriter.append(\"package \").append(packageName).append(\";\\n\\n\");\n                javaWriter.append(\"public class \").append(className).append(\" {\\n\");\n                javaWriter.append(\"    public \").append(className).append(\"() {\\n\");\n                javaWriter.append(\"        System.out.println(\\\"Hey there!\\\");\\n\");\n                javaWriter.append(\"    }\\n}\\n\");\n                javaWriter.close();\n            } catch (IOException e) {\n                throw new RuntimeException(e);\n            }\n        }\n        return !elements.isEmpty();\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/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.compiler.it</groupId>\n    <artifactId>mcompiler503-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler503-annotation-processor-dep</artifactId>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v1/src/main/java/mcompiler503/AnnotationProcessorDependencyV1.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 mcompiler503;\n\npublic class AnnotationProcessorDependencyV1 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/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.compiler.it</groupId>\n    <artifactId>mcompiler503-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler503-annotation-processor-dep</artifactId>\n  <version>2.0.0-SNAPSHOT</version>\n\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-processor-dep-v2/src/main/java/mcompiler503/AnnotationProcessorDependencyV2.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 mcompiler503;\n\npublic class AnnotationProcessorDependencyV2 {}\n"
  },
  {
    "path": "src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/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.compiler.it</groupId>\n    <artifactId>mcompiler503-test</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>mcompiler503-annotation-user</artifactId>\n\n  <build>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <annotationProcessors>\n            <annotationProcessor>mcompiler503.SimpleAnnotationProcessor</annotationProcessor>\n          </annotationProcessors>\n          <annotationProcessorPaths>\n            <path>\n              <groupId>org.apache.maven.plugins.compiler.it</groupId>\n              <artifactId>mcompiler503-annotation-processor</artifactId>\n              <version>1.0.0-SNAPSHOT</version>\n            </path>\n            <path>\n              <!-- This version should override / replace the 'mcompiler503-annotation-processor-dep:1.0.0-SNAPSHOT'\n                   which is a dependency of 'mcompiler503-annotation-processor' -->\n              <groupId>org.apache.maven.plugins.compiler.it</groupId>\n              <artifactId>mcompiler503-annotation-processor-dep</artifactId>\n              <version>2.0.0-SNAPSHOT</version>\n            </path>\n          </annotationProcessorPaths>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>annotation-verify-plugin</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n        <executions>\n          <execution>\n            <id>verify-annotations</id>\n            <goals>\n              <goal>read-source</goal>\n            </goals>\n            <phase>process-test-classes</phase>\n            <configuration>\n              <sourceClass>mcompiler503.SimpleObject</sourceClass>\n              <testSourceClass>mcompiler503.SimpleTestObject</testSourceClass>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleAnnotation.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 mcompiler503;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n@Target(ElementType.TYPE)\n@Retention(RetentionPolicy.SOURCE)\npublic @interface SimpleAnnotation {}\n"
  },
  {
    "path": "src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/main/java/mcompiler503/SimpleObject.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 mcompiler503;\n\n@SimpleAnnotation\npublic class SimpleObject {}\n"
  },
  {
    "path": "src/it/MCOMPILER-503-processorpath-duplicated-deps/annotation-user/src/test/java/mcompiler503/SimpleTestObject.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 mcompiler503;\n\n@SimpleAnnotation\npublic class SimpleTestObject {}\n"
  },
  {
    "path": "src/it/MCOMPILER-503-processorpath-duplicated-deps/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=process-test-classes\n"
  },
  {
    "path": "src/it/MCOMPILER-503-processorpath-duplicated-deps/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler503-test</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <modules>\n    <module>annotation-processor-dep-v1</module>\n    <module>annotation-processor-dep-v2</module>\n    <module>annotation-processor</module>\n    <module>annotation-user</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>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-512/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 test\ninvoker.buildResult = success\n"
  },
  {
    "path": "src/it/MCOMPILER-512/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>maven-compiler-plugin-MCOMPILER512</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>jar</packaging>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    <maven.compiler.release />\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-512/src/main/java/dummy/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 dummy;\n\nimport javax.smartcardio.TerminalFactory;\n\npublic class Main {\n\n    public static void main(String[] args) {\n        TerminalFactory tf = TerminalFactory.getDefault();\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-512/src/test/java/dummy/Test.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 dummy;\n\nimport javax.smartcardio.TerminalFactory;\n\npublic class Test {\n    public void test() {\n        TerminalFactory tf = TerminalFactory.getDefault();\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-522-unresolvable-dependency/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 = compile\ninvoker.buildResult = failure\n"
  },
  {
    "path": "src/it/MCOMPILER-522-unresolvable-dependency/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler522-unresolvable-annotation-processor-depdendency</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <annotationProcessors>\n            <annotationProcessor>org.issue.SimpleAnnotationProcessor</annotationProcessor>\n          </annotationProcessors>\n          <annotationProcessorPaths>\n            <path>\n              <groupId>org.apache.maven.plugins.compiler.it</groupId>\n              <artifactId>annotation-processor-non-existing</artifactId>\n              <version>1.0-SNAPSHOT</version>\n            </path>\n          </annotationProcessorPaths>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleAnnotation.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.compiler.it;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n@Target(ElementType.TYPE)\n@Retention(RetentionPolicy.SOURCE)\npublic @interface SimpleAnnotation {}\n"
  },
  {
    "path": "src/it/MCOMPILER-522-unresolvable-dependency/src/main/java/org/apache.maven.plugins.compiler.it/SimpleObject.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.compiler.it;\n\n@SimpleAnnotation\npublic class SimpleObject {}\n"
  },
  {
    "path": "src/it/MCOMPILER-522-unresolvable-dependency/verify.groovy",
    "content": "\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 */\ndef logFile = new File( basedir, 'build.log' )\nassert logFile.exists()\n\ndef buildLog = logFile.getText('UTF-8')\nassert buildLog.contains( \"Resolution of annotationProcessorPath dependencies failed: \" )\nassert buildLog.contains(\n        \"The POM for org.apache.maven.plugins.compiler.it:annotation-processor-non-existing:jar:1.0-SNAPSHOT is missing, no dependency information available\" )\n"
  },
  {
    "path": "src/it/MCOMPILER-525/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: The first time, we run up to \"integration-test\" phase which includes the AntRun execution which saves the\n# timestamp of the first JAR for comparison with the timestamp of the JAR from the final \"package\" invocation.\n# Note:\ninvoker.goals.1 = clean integration-test\ninvoker.goals.2 = package -Dmaven.compiler.showCompilationChanges=true\n"
  },
  {
    "path": "src/it/MCOMPILER-525/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>MCOMPILER-525-no-recreation</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>jar</packaging>\n  <name>MCOMPILER-525-no-recreation</name>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</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-antrun-plugin</artifactId>\n        <version>@version.maven-antrun-plugin@</version>\n        <executions>\n          <execution>\n            <id>touch</id>\n            <goals>\n              <goal>run</goal>\n            </goals>\n            <phase>integration-test</phase>\n            <configuration>\n              <target>\n                <!-- Save the JAR and especially its timestamp for evaluation by the post-build hook script -->\n                <copy file=\"target/MCOMPILER-525-no-recreation-1.0-SNAPSHOT.jar\" overwrite=\"true\" preservelastmodified=\"true\" tofile=\"target/reference.jar\" />\n              </target>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-525/src/main/java/myproject/HelloWorld.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 myproject;\n\n/**\n * The classic Hello World App.\n */\npublic class HelloWorld {\n\n    /**\n     * Main method.\n     *\n     * @param args Not used\n     */\n    public static void main(String[] args) {\n        System.out.println(\"Hi!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-525/verify.groovy",
    "content": "\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 java.nio.file.*;\nimport java.time.*;\nimport java.time.temporal.*\nimport java.util.*;\n\nFile target = new File( basedir, \"target\" );\nassert target.isDirectory()\n\nFile jarFile = new File( target, \"MCOMPILER-525-no-recreation-1.0-SNAPSHOT.jar\" );\nassert jarFile.isFile()\n\nFile refFile = new File( target, \"reference.jar\" );\nassert refFile.isFile()\n\nInstant referenceTimestamp = Files.getLastModifiedTime( refFile.toPath() )\n    .toInstant().truncatedTo( ChronoUnit.MILLIS );\nSystem.out.println( \"Reference timestamp: \" + referenceTimestamp );\n\nInstant actualTimestamp = Files.getLastModifiedTime( jarFile.toPath() )\n    .toInstant().truncatedTo( ChronoUnit.MILLIS );\nSystem.out.println( \"Actual timestamp   : \" + actualTimestamp );\n\nassert referenceTimestamp.equals(actualTimestamp),\n    \"Timestamps don't match, JAR was recreated although contents has not changed\"\n"
  },
  {
    "path": "src/it/MCOMPILER-542/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>MCOMPILER-542</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <name>${java.specification.version}</name>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    <project.build.outputTimestamp>2023-08-14T15:12:12Z</project.build.outputTimestamp>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.slf4j</groupId>\n      <artifactId>slf4j-jdk-platform-logging</artifactId>\n      <version>2.0.9</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <executions>\n          <execution>\n            <id>default-compile</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>${java.specification.version}</release>\n            </configuration>\n          </execution>\n          <execution>\n            <id>compile-release-9</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>17</release>\n              <outputDirectory>${project.build.outputDirectory}-9</outputDirectory>\n            </configuration>\n          </execution>\n          <execution>\n            <id>compile-target</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>${java.specification.version}</release>\n              <outputDirectory>${project.build.outputDirectory}-target</outputDirectory>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-542/src/main/java/module-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 */\nmodule app {\n    requires java.logging;\n    requires jdk.zipfs;\n    requires org.slf4j.jdk.platform.logging;\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-542/src/main/java/org/maven/test/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.maven.test;\n\npublic class Main {\n\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-542/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\n// Check if the javap tool is available\ndef javapTool = java.util.spi.ToolProvider.findFirst(\"javap\")\nassert javapTool.isPresent() : \"javap tool not found. Make sure you have the JDK installed.\"\n\ndef moduleDescriptor = new File(basedir, \"target/classes/module-info.class\")\n// Create a list of arguments to pass to the javap tool\nString[] args = [\"-v\", moduleDescriptor]\n\ndef swout = new StringWriter(), swerr = new StringWriter()\n// Execute the javap tool with args\ndef result = javapTool.get().run(new PrintWriter(swout), new PrintWriter(swerr), args)\nprintln swerr.toString().isEmpty() ? \"javap output:\\n$swout\" : \"javap error:\\n$swerr\"\nassert (result == 0) : \"javap run failed\"\n\n// Assertions of module content\ndef out = swout.toString()\nassert out.contains('// \"java.base\" ACC_MANDATED') : \"module not found in module-info.class\"\nassert out.contains('// \"java.logging\"') : \"module not found in module-info.class\"\nassert out.contains('// \"jdk.zipfs\"') : \"module not found in module-info.class\"\nassert out.contains('// \"org.slf4j.jdk.platform.logging\"') : \"module not found in module-info.class\"\nassert out.contains('// 2.0.9') : \"version of org.slf4j.jdk.platform.logging module not found\"\n\n// Validation that the module-info should not contain the full java version but the spec version.\ndef javaVersion = System.getProperty('java.version')\ndef javaSpecVersion = System.getProperty('java.specification.version')\nif (javaVersion != javaSpecVersion) { // handle the case when is the first release\n  assert !out.contains('// ' + javaVersion) : \"full java version found in module descriptor\"\n}\nassert out.contains('// ' + javaSpecVersion) : \"java specification version not found in module descriptor\"\n\n// Additional validation that the checksum is always the same: useful because constant pool reordering happens when\n// transforming bytecode, then we need to check results precisely\ndef checksumMap = [\n    '21': 'SHA-256 checksum ccc6515c8fc1bf4e675e205b2a5200d02545b06014b304c292eeddc68cffee8d',\n    '17': 'SHA-256 checksum 102f24c71aff97210d66ef791b7d56f8a25ff8692d2c97b21682bc7170aaca9c',\n    '11': 'MD5 checksum 5779cc6044dcba6ae4060e5a2f8a32c8'\n]\n\ndef expectedChecksum = checksumMap[javaSpecVersion]\nif (expectedChecksum) {\n    println \"Java version: $javaVersion\"\n    assert out.contains(expectedChecksum) : \"checksum doesn't match expected output\"\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-567/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 = test\n"
  },
  {
    "path": "src/it/MCOMPILER-567/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>MCOMPILER-567</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>jar</packaging>\n  <name>MCOMPILER-567</name>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-567/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 */\npublic class Main {}\n"
  },
  {
    "path": "src/it/MCOMPILER-567/src/test/java/.keep",
    "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/MCOMPILER-567/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 target = new File( basedir, \"target\" );\nassert target.isDirectory()\n\nassert new File( target, \"classes/Main.class\" ).exists();\n"
  },
  {
    "path": "src/it/MCOMPILER-567-kt/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 compile\n"
  },
  {
    "path": "src/it/MCOMPILER-567-kt/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>MCOMPILER-567-kt</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>jar</packaging>\n  <name>MCOMPILER-567-kt</name>\n\n  <properties>\n    <kotlin.compiler.daemon>false</kotlin.compiler.daemon>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.jetbrains.kotlin</groupId>\n      <artifactId>kotlin-stdlib</artifactId>\n      <version>2.2.20</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.jetbrains.kotlin</groupId>\n        <artifactId>kotlin-maven-plugin</artifactId>\n        <version>2.2.20</version>\n        <executions>\n          <execution>\n            <id>compile</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <id>default-compile</id>\n            <phase>none</phase>\n          </execution>\n          <execution>\n            <id>default-testCompile</id>\n            <phase>none</phase>\n          </execution>\n          <execution>\n            <id>java-compile</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <phase>compile</phase>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n    <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-567-kt/src/main/kotlin/KotlinService.kt",
    "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\nclass KotlinService {\n\n    fun sayHello() {\n        System.out.println(\"Kotlin says 'Hello World!'\")\n    }\n\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-567-kt/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 target = new File( basedir, \"target\" );\nassert target.isDirectory()\n\nassert new File( target, \"classes/KotlinService.class\" ).exists();\n"
  },
  {
    "path": "src/it/MCOMPILER-609/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>MCOMPILER-609</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>jar</packaging>\n  <name>MCOMPILER-609</name>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <compilerId>ecj</compilerId>\n        </configuration>\n        <dependencies>\n          <dependency>\n            <groupId>org.eclipse.jdt</groupId>\n            <artifactId>ecj</artifactId>\n            <version>@eclipseCompilerVersion@</version>\n          </dependency>\n        </dependencies>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/MCOMPILER-609/src/main/java/myproject/HelloWorld.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 myproject;\n\npublic class HelloWorld {\n    public static void main(final String[] args) {\n        System.out.println(\"Hello world\");\n    }\n}\n"
  },
  {
    "path": "src/it/MCOMPILER-609/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, 'target/classes/myproject/HelloWorld.class' ).isFile()\n"
  },
  {
    "path": "src/it/automodules-application/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>automodules</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.codehaus.plexus</groupId>\n      <artifactId>plexus-utils</artifactId>\n      <version>3.0.24</version>\n      <type>modular-jar</type>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/automodules-application/src/main/java/module-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 */\nmodule app {\n    requires plexus.utils;\n}\n"
  },
  {
    "path": "src/it/automodules-application/src/main/java/org/maven/test/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.maven.test;\n\nimport org.codehaus.plexus.util.StringUtils;\n\npublic class Main {\n\n    /**\n     * @param args\n     */\n    public static void main(String[] args) {\n        System.out.println(StringUtils.concatenate(args));\n    }\n}\n"
  },
  {
    "path": "src/it/automodules-application/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\nbuildLog = new File( basedir, 'build.log' ).text;\n\nassert buildLog.contains(\"[WARNING] Filename-based automodules detected on the module path:\")\nassert buildLog.contains(\"  - plexus-utils-3.0.24.jar\")\n"
  },
  {
    "path": "src/it/automodules-library/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>automodules</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.codehaus.plexus</groupId>\n      <artifactId>plexus-utils</artifactId>\n      <version>3.0.24</version>\n      <type>modular-jar</type>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/automodules-library/src/main/java/module-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 */\nmodule lib {\n    requires plexus.utils;\n\n    exports org.maven.test;\n}\n"
  },
  {
    "path": "src/it/automodules-library/src/main/java/org/maven/test/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.maven.test;\n\nimport org.codehaus.plexus.util.StringUtils;\n\npublic class Main {\n\n    /**\n     * @param args\n     */\n    public static void main(String[] args) {\n        System.out.println(StringUtils.concatenate(args));\n    }\n}\n"
  },
  {
    "path": "src/it/automodules-library/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\nbuildLog = new File( basedir, 'build.log' ).text;\n\nassert buildLog.contains(\"[WARNING] Filename-based automodules detected on the module path:\")\nassert buildLog.contains(\"  - plexus-utils-3.0.24.jar\")\n"
  },
  {
    "path": "src/it/automodules-manifest/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>automodules</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>ta3</artifactId>\n      <version>3.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/automodules-manifest/src/main/java/module-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 */\nmodule app {\n    requires com.ta3;\n}\n"
  },
  {
    "path": "src/it/automodules-manifest/src/main/java/org/maven/test/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.maven.test;\n\npublic class Main {\n    public static void main(String[] args) {\n        System.out.println(com.ta3.MyClass.class.getName());\n    }\n}\n"
  },
  {
    "path": "src/it/automodules-manifest/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\nbuildLog = new File( basedir, 'build.log' ).text;\n\nassert !buildLog.contains(\"Filename-based automodules detected on the module path\")\n"
  },
  {
    "path": "src/it/automodules-transitive-module/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>automodules</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.codehaus.plexus</groupId>\n      <artifactId>plexus-utils</artifactId>\n      <version>3.0.24</version>\n      <type>modular-jar</type>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/automodules-transitive-module/src/main/java/module-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 */\nmodule lib {\n    requires plexus.utils;\n\n    exports org.maven.test;\n}\n"
  },
  {
    "path": "src/it/automodules-transitive-module/src/main/java/org/maven/test/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.maven.test;\n\nimport org.codehaus.plexus.util.StringUtils;\n\npublic class Main {\n\n    /**\n     * @param args\n     */\n    public static void main(String[] args) {\n        System.out.println(StringUtils.concatenate(args));\n    }\n}\n"
  },
  {
    "path": "src/it/automodules-transitive-module/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\nbuildLog = new File( basedir, 'build.log' ).text;\n\nassert buildLog.contains(\"[WARNING] Filename-based automodules detected on the module path:\")\nassert buildLog.contains(\"  - plexus-utils-3.0.24.jar\")\n"
  },
  {
    "path": "src/it/default/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>default</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <name>Test for default configuration</name>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <compilerArgs>\n            <compilerArg>-Xlint:-path</compilerArg>\n          </compilerArgs>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/default/src/main/java/MyClass.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 foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/default/src/test/java/MyTest.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 foo;\n\npublic class MyTest {}\n"
  },
  {
    "path": "src/it/default/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.*;\nimport java.util.regex.*;\n\ntry\n{\n    File mainClass = new File( basedir, \"target/classes/foo/MyClass.class\" );\n    if ( !mainClass.isFile() )\n    {\n        System.out.println( \"Main class not existent: \" + mainClass );\n        return false;\n    }\n\n    File testClass = new File( basedir, \"target/test-classes/foo/MyTest.class\" );\n    if ( !testClass.isFile() )\n    {\n        System.out.println( \"Test class not existent: \" + testClass );\n        return false;\n    }\n}\ncatch( Throwable t )\n{\n    t.printStackTrace();\n    return false;\n}\n\nreturn true;\n"
  },
  {
    "path": "src/it/default-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\ninvoker.os.family = !windows\n"
  },
  {
    "path": "src/it/default-fork/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>default-fork</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <name>Test for default configuration</name>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\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-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <fork>true</fork>\n          <compilerArgs>\n            <compilerArg>-Xlint:-path</compilerArg>\n          </compilerArgs>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/default-fork/src/main/java/MyClass.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 foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/default-fork/src/test/java/MyTest.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 foo;\n\nimport org.junit.jupiter.api.Test;\n\npublic class MyTest {\n\n    @Test\n    public void test() {\n        System.out.println(\"test\");\n    }\n}\n"
  },
  {
    "path": "src/it/default-fork/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/classes/foo/MyClass.class').exists()\nassert new File( basedir, 'target/test-classes/foo/MyTest.class').exists()\n\nassert !new File( basedir, 'target/classes/javac.sh').exists()\nassert !new File( basedir, 'target/classes/javac.bat').exists()\n\nassert !new File( basedir, 'target/javac.bat').exists()\nassert !new File( basedir, 'target/javac-test.bat').exists()\n\nassert new File( basedir, 'target/javac.sh').exists()\nassert new File( basedir, 'target/javac-test.sh').exists()\n"
  },
  {
    "path": "src/it/default-fork-windows/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.os.family = windows\n"
  },
  {
    "path": "src/it/default-fork-windows/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>default-fork-windows</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <name>Test for default configuration</name>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\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  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <fork>true</fork>\n          <compilerArgs>\n            <compilerArg>-Xlint:-path</compilerArg>\n          </compilerArgs>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/default-fork-windows/src/main/java/MyClass.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 foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/default-fork-windows/src/test/java/MyTest.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 foo;\n\nimport org.junit.jupiter.api.Test;\n\npublic class MyTest {\n\n    @Test\n    public void test() {\n        System.out.println(\"test\");\n    }\n}\n"
  },
  {
    "path": "src/it/default-fork-windows/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/classes/foo/MyClass.class').exists()\nassert new File( basedir, 'target/test-classes/foo/MyTest.class').exists()\n\nassert !new File( basedir, 'target/classes/javac.sh').exists()\nassert !new File( basedir, 'target/classes/javac.bat').exists()\n\nassert !new File( basedir, 'target/javac.sh').exists()\nassert !new File( basedir, 'target/javac-test.sh').exists()\nassert new File( basedir, 'target/javac.bat').exists()\nassert new File( basedir, 'target/javac-test.bat').exists()\n"
  },
  {
    "path": "src/it/default-fork_modular/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>default-fork-modular</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <name>Test for default configuration in a modular project</name>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <fork>true</fork>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/default-fork_modular/src/main/java/foo/MyClass.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 foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/default-fork_modular/src/main/java/module-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 */\nmodule com.foo {\n    exports foo;\n}\n"
  },
  {
    "path": "src/it/default-fork_modular/src/test/java/foo/MyTest.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 foo;\n\npublic class MyTest {}\n"
  },
  {
    "path": "src/it/default-fork_modular/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/classes/foo/MyClass.class').exists()\nassert new File( basedir, 'target/test-classes/foo/MyTest.class').exists()\nassert new File( basedir, 'target/classes/module-info.class').exists()\n\n// For each line, exactly one of the two files should exist.\nassert new File( basedir, 'target/javac.sh').exists() != new File( basedir, 'target/javac.bat').exists()\nassert new File( basedir, 'target/javac-test.sh').exists() != new File( basedir, 'target/javac-test.bat').exists()\n"
  },
  {
    "path": "src/it/default-incremental-disable/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 test-compile\ninvoker.goals.2 = test-compile\n"
  },
  {
    "path": "src/it/default-incremental-disable/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>default-incremental-disable</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <name>Test for default configuration</name>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\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  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <useIncrementalCompilation>false</useIncrementalCompilation>\n          <compilerArgs>\n            <compilerArg>-Xlint:-path</compilerArg>\n          </compilerArgs>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/default-incremental-disable/src/main/java/foo/MyClass.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 foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/default-incremental-disable/src/test/java/foo/MyTest.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 foo;\n\nimport org.junit.jupiter.api.Test;\n\npublic class MyTest {\n\n    @Test\n    public void test() {\n        System.out.println(\"test\");\n    }\n}\n"
  },
  {
    "path": "src/it/default-incremental-disable/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/classes/foo/MyClass.class\" ).exists();\nassert new File( basedir, \"target/test-classes/foo/MyTest.class\" ).exists();\n\ncontent = new File( basedir, 'build.log' ).text;\n\nassert content.contains(\"Nothing to compile - all classes are up to date\");\n"
  },
  {
    "path": "src/it/includes-excludes/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.plugins.compiler.it</groupId>\n  <artifactId>includes-excludes</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <description>Test that source includes/excludes with in the compiler plugin config.\n    This will test excludes and testExcludes...</description>\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  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <excludes>\n            <exclude>**/PersonTwo.java</exclude>\n          </excludes>\n          <testExcludes>\n            <testExclude>**/PersonTwoTest.java</testExclude>\n          </testExcludes>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/includes-excludes/src/main/java/org/apache/maven/it0055/Person.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.it0055;\n\npublic class Person {\n    private String name;\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public String getName() {\n        return name;\n    }\n}\n"
  },
  {
    "path": "src/it/includes-excludes/src/main/java/org/apache/maven/it0055/PersonTwo.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.it0055;\n\npublic class PersonTwo {\n    private String name;\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n    public String getName() {\n        return name;\n    }\n}\n"
  },
  {
    "path": "src/it/includes-excludes/src/test/java/org/apache/maven/it0055/PersonTest.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.it0055;\n\nimport org.junit.jupiter.api.Test;\n\nimport static org.junit.jupiter.api.Assertions.assertEquals;\n\npublic class PersonTest {\n\n    @Test\n    public void testPerson() {\n        Person person = new Person();\n\n        person.setName(\"foo\");\n\n        assertEquals(\"foo\", person.getName());\n    }\n}\n"
  },
  {
    "path": "src/it/includes-excludes/src/test/java/org/apache/maven/it0055/PersonTwoTest.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.it0055;\n\nimport org.junit.jupiter.api.Test;\n\nimport static org.junit.jupiter.api.Assertions.assertEquals;\n\npublic class PersonTwoTest {\n\n    @Test\n    public void testPerson() {\n        Person person = new Person();\n\n        person.setName(\"foo\");\n\n        assertEquals(\"foo\", person.getName());\n    }\n}\n"
  },
  {
    "path": "src/it/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.*;\nimport java.util.regex.*;\n\ntry\n{\n    File targetDir = new File( basedir, \"target\" );\n\n    File mainClass = new File( targetDir, \"classes/org/apache/maven/it0055/Person.class\" );\n    System.out.println( \"Checking for existence of: \" + mainClass );\n    if ( !mainClass.isFile() )\n    {\n        System.err.println( \"FAILED!\" );\n        return false;\n    }\n\n    File excludedMainClass = new File( targetDir, \"classes/org/apache/maven/it0055/PersonTwo.class\" );\n    System.out.println( \"Checking for absence of: \" + excludedMainClass );\n    if ( excludedMainClass.exists() )\n    {\n        System.err.println( \"FAILED!\" );\n        return false;\n    }\n\n    File testClass = new File( targetDir, \"test-classes/org/apache/maven/it0055/PersonTest.class\" );\n    System.out.println( \"Checking for existence of: \" + testClass );\n    if ( !testClass.isFile() )\n    {\n        System.err.println( \"FAILED!\" );\n        return false;\n    }\n\n    File excludedTestClass = new File( targetDir, \"test-classes/org/apache/maven/it0055/PersonTwoTest.class\" );\n    System.out.println( \"Checking for absence of: \" + excludedTestClass );\n    if ( excludedTestClass.exists() )\n    {\n        System.err.println( \"FAILED!\" );\n        return false;\n    }\n}\ncatch( Throwable t )\n{\n    t.printStackTrace();\n    return false;\n}\n\nreturn true;\n"
  },
  {
    "path": "src/it/jdk16-annotation/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>jdk16-annotation</artifactId>\n  <version>1.0-SNAPSHOT</version>\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  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <executions>\n          <execution>\n            <!-- NOTE: This requires MNG-3203 to take effect -->\n            <id>default-compile</id>\n            <configuration>\n              <proc>none</proc>\n            </configuration>\n          </execution>\n          <execution>\n            <id>default-testCompile</id>\n            <goals>\n              <goal>testCompile</goal>\n            </goals>\n            <configuration>\n              <proc>full</proc>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/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 com.mycompany.jdk16annotation;\n\n/**\n * Hello world!\n *\n */\npublic class App {\n    public static void main(String[] args) {\n        System.out.println(\"Hello World!\");\n    }\n}\n"
  },
  {
    "path": "src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/ServiceProvider.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 com.mycompany.jdk16annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n@Retention(RetentionPolicy.SOURCE)\n@Target(ElementType.TYPE)\npublic @interface ServiceProvider {\n    Class<?> service();\n\n    int position() default Integer.MAX_VALUE;\n\n    String path() default \"\";\n}\n"
  },
  {
    "path": "src/it/jdk16-annotation/src/main/java/com/mycompany/jdk16annotation/ServiceProviderProcessor.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 com.mycompany.jdk16annotation;\n\nimport javax.annotation.processing.AbstractProcessor;\nimport javax.annotation.processing.RoundEnvironment;\nimport javax.annotation.processing.SupportedAnnotationTypes;\nimport javax.annotation.processing.SupportedSourceVersion;\nimport javax.lang.model.SourceVersion;\nimport javax.lang.model.element.Element;\nimport javax.lang.model.element.TypeElement;\nimport javax.tools.Diagnostic.Kind;\nimport javax.tools.FileObject;\nimport javax.tools.StandardLocation;\n\nimport java.io.IOException;\nimport java.io.OutputStream;\nimport java.io.OutputStreamWriter;\nimport java.io.PrintWriter;\nimport java.util.Set;\n\n@SupportedSourceVersion(SourceVersion.RELEASE_17)\n@SupportedAnnotationTypes(\"com.mycompany.jdk16annotation.ServiceProvider\")\npublic class ServiceProviderProcessor extends AbstractProcessor {\n    /** public for ServiceLoader */\n    public ServiceProviderProcessor() {}\n\n    @Override\n    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {\n        if (roundEnv.errorRaised()) {\n            return false;\n        }\n        if (roundEnv.processingOver()) {\n            writeServices();\n            return true;\n        } else {\n            return true;\n        }\n    }\n\n    private void writeServices() {\n        try {\n            FileObject out = processingEnv\n                    .getFiler()\n                    .createResource(StandardLocation.CLASS_OUTPUT, \"\", \"META-INF/one\", new Element[0]);\n            try (OutputStream os = out.openOutputStream()) {\n                OutputStream os2 = processingEnv\n                        .getFiler()\n                        .createSourceFile(\"org.Milos\", new Element[0])\n                        .openOutputStream();\n                try (OutputStreamWriter osr = new OutputStreamWriter(os2)) {\n                    PrintWriter w = new PrintWriter(new OutputStreamWriter(os, \"UTF-8\"));\n                    w.write(\"test\");\n                    w.flush();\n                    String clazz = \"package org;\\n class Milos {}\";\n                    osr.write(clazz.toCharArray());\n                    osr.flush();\n                }\n            }\n        } catch (IOException x) {\n            processingEnv.getMessager().printMessage(Kind.ERROR, \"Failed to write to one: \" + x.toString());\n        }\n    }\n}\n"
  },
  {
    "path": "src/it/jdk16-annotation/src/main/resources/META-INF/services/javax.annotation.processing.Processor",
    "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\ncom.mycompany.jdk16annotation.ServiceProviderProcessor\n"
  },
  {
    "path": "src/it/jdk16-annotation/src/test/java/com/mycompany/jdk16annotation/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 com.mycompany.jdk16annotation;\n\nimport org.junit.jupiter.api.Test;\n\nimport static org.junit.jupiter.api.Assertions.assertTrue;\n\n/**\n * Unit test for simple App.\n */\n@ServiceProvider(service = App.class, path = \"xxx\", position = 1)\npublic class AppTest {\n\n    /**\n     * Rigourous Test :-)\n     */\n    @Test\n    public void testApp() {\n        assertTrue(true);\n    }\n}\n"
  },
  {
    "path": "src/it/jdk16-annotation/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.*;\nimport java.util.regex.*;\n\ntry\n{\n    File res = new File( basedir, \"target/test-classes/META-INF/one\" );\n    if ( !res.isFile() )\n    {\n        System.out.println( \"generated resource not existent: \" + res );\n        return false;\n    }\n    File java = new File( basedir, \"target/generated-test-sources/test-annotations/org/Milos.java\" );\n    if ( !java.isFile() )\n    {\n        System.out.println( \"generated java file not existent: \" + java );\n        return false;\n    }\n\n}\ncatch( Throwable t )\n{\n    t.printStackTrace();\n    return false;\n}\n\nreturn true;\n"
  },
  {
    "path": "src/it/jdk9-exportsto/bar/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>exportsto</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>bar</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>foo</artifactId>\n      <version>1.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/jdk9-exportsto/bar/src/main/java/module-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\nmodule bar {\n    requires foo;\n}\n"
  },
  {
    "path": "src/it/jdk9-exportsto/foo/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>exportsto</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>foo</artifactId>\n\n</project>\n"
  },
  {
    "path": "src/it/jdk9-exportsto/foo/src/main/java/foo/Foo.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 foo;\n\npublic class Foo {}\n"
  },
  {
    "path": "src/it/jdk9-exportsto/foo/src/main/java/module-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\nmodule foo {\n    exports foo to\n            bar;\n}\n"
  },
  {
    "path": "src/it/jdk9-exportsto/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>exportsto</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <modules>\n    <module>foo</module>\n    <module>bar</module>\n  </modules>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\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>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/jpms_add-exports/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>illegal-access</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\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>@project.version@</version>\n          <configuration>\n            <compilerArgs>\n              <arg>--add-exports</arg>\n              <arg>app/org.maven.test=ALL_UNNAMED</arg>\n            </compilerArgs>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/jpms_add-exports/src/main/java/module-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 */\nmodule app {}\n"
  },
  {
    "path": "src/it/jpms_add-exports/src/main/java/org/maven/test/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.maven.test;\n\npublic class Main {\n\n    /**\n     * @param args\n     */\n    public static void main(String[] args) {\n        try {\n            Class.forName(\"jdk.internal.util.Preconditions\").newInstance();\n        } catch (Exception e) {\n            // noop\n        }\n    }\n}\n"
  },
  {
    "path": "src/it/jpms_add-exports/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 args = new File( basedir, 'target/javac.args' ).text;\nassert args.contains( '--add-exports app/org.maven.test=ALL_UNNAMED' )\n/*\n * A previous version of this file made more extensive checks of `jpms.args` file content.\n * But the `jpms.args` file is no longer generated since Maven compiler plugin version 4.\n */\n"
  },
  {
    "path": "src/it/jpms_compile-main-empty-test-bar/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>compile-main-empty-test-bar</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.junit.jupiter</groupId>\n      <artifactId>junit-jupiter-api</artifactId>\n      <version>5.2.0</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/jpms_compile-main-empty-test-bar/src/test/java/bar/BarTests.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 bar;\n\nimport javax.script.*;\n\nimport org.junit.jupiter.api.*;\n\nclass BarTests {\n    @Test\n    void scripting() throws ScriptException {\n        ScriptEngineManager factory = new ScriptEngineManager();\n        ScriptEngine engine = factory.getEngineByName(\"JavaScript\");\n        Assertions.assertDoesNotThrow(() -> engine.eval(\"print('Hello, World')\"), \"Script evaluation failed!\");\n    }\n}\n"
  },
  {
    "path": "src/it/jpms_compile-main-empty-test-bar/src/test/java/module-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\nopen module bar {\n    requires java.scripting;\n    requires org.junit.jupiter.api;\n}\n"
  },
  {
    "path": "src/it/jpms_compile-main-empty-test-bar/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/test-classes/module-info.class\" ).exists()\nassert new File( basedir, \"target/test-classes/bar/BarTests.class\" ).exists()\n"
  },
  {
    "path": "src/it/jpms_compile-main-foo-test-bar/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>compile-test-modules</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.commons</groupId>\n      <artifactId>commons-lang3</artifactId>\n      <version>3.18.0</version>\n    </dependency>\n    <dependency>\n      <groupId>org.junit.jupiter</groupId>\n      <artifactId>junit-jupiter-api</artifactId>\n      <version>5.2.0</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/jpms_compile-main-foo-test-bar/src/main/java/foo/Foo.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 foo;\n\nimport org.apache.commons.lang3.*;\n\npublic class Foo {\n    public Foo() {\n        System.out.println(StringUtils.swapCase(\"fOO\") + \" created!\");\n    }\n}\n"
  },
  {
    "path": "src/it/jpms_compile-main-foo-test-bar/src/main/java/module-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\nmodule foo.bar {\n    requires org.apache.commons.lang3;\n\n    exports foo;\n}\n"
  },
  {
    "path": "src/it/jpms_compile-main-foo-test-bar/src/test/java/bar/BarTests.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 bar;\n\nimport foo.*;\nimport org.junit.jupiter.api.*;\n\nclass BarTests {\n    @Test\n    void constructor() {\n        Assertions.assertNotNull(new Foo());\n    }\n\n    @Test\n    void moduleNameIsFoo() {\n        Assertions.assertTrue(Foo.class.getModule().isNamed(), \"Foo resides in a named module\");\n        Assertions.assertEquals(\"foo.bar\", Foo.class.getModule().getName());\n    }\n}\n"
  },
  {
    "path": "src/it/jpms_compile-main-foo-test-bar/src/test/java/module-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\nopen module bar.biz {\n    requires foo.bar;\n    requires java.scripting;\n    requires org.junit.jupiter.api;\n}\n"
  },
  {
    "path": "src/it/jpms_compile-main-foo-test-bar/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/classes/module-info.class\" ).exists()\nassert new File( basedir, \"target/classes/foo/Foo.class\" ).exists()\n\nassert new File( basedir, \"target/test-classes/module-info.class\" ).exists()\nassert new File( basedir, \"target/test-classes/bar/BarTests.class\" ).exists()\n"
  },
  {
    "path": "src/it/jpms_compile-main-foo-test-foo/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>compile-test-modules</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.commons</groupId>\n      <artifactId>commons-lang3</artifactId>\n      <version>3.18.0</version>\n    </dependency>\n    <dependency>\n      <groupId>org.junit.jupiter</groupId>\n      <artifactId>junit-jupiter-api</artifactId>\n      <version>5.2.0</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/jpms_compile-main-foo-test-foo/src/main/java/foo/Foo.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 foo;\n\nimport org.apache.commons.lang3.*;\n\nclass Foo {\n    Foo() {\n        System.out.println(StringUtils.swapCase(\"fOO\") + \" created!\");\n    }\n}\n"
  },
  {
    "path": "src/it/jpms_compile-main-foo-test-foo/src/main/java/module-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\nmodule foo.bar {\n    requires org.apache.commons.lang3;\n}\n"
  },
  {
    "path": "src/it/jpms_compile-main-foo-test-foo/src/test/java/foo/FooTests.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 foo;\n\nimport org.junit.jupiter.api.*;\n\nclass FooTests {\n    @Test\n    void constructor() {\n        Assertions.assertNotNull(new Foo());\n    }\n\n    @Test\n    void moduleNameIsFoo() {\n        Assertions.assertTrue(Foo.class.getModule().isNamed(), \"Foo resides in a named module\");\n        Assertions.assertEquals(\"foo.bar\", Foo.class.getModule().getName());\n    }\n}\n"
  },
  {
    "path": "src/it/jpms_compile-main-foo-test-foo/src/test/java/module-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\nopen module foo.bar {\n    // main\n    requires org.apache.commons.lang3;\n\n    // test\n    requires java.scripting;\n    requires org.junit.jupiter.api;\n}\n"
  },
  {
    "path": "src/it/jpms_compile-main-foo-test-foo/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/classes/module-info.class\").exists()\nassert new File( basedir, \"target/classes/foo/Foo.class\").exists()\n\nassert new File( basedir, \"target/test-classes/module-info.class\").exists()\nassert new File( basedir, \"target/test-classes/foo/FooTests.class\").exists()\n"
  },
  {
    "path": "src/it/jpms_patch-module/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>patch-module</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\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>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/jpms_patch-module/src/main/java/module-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 */\nmodule app {}\n"
  },
  {
    "path": "src/it/jpms_patch-module/src/main/java/org/maven/test/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.maven.test;\n\npublic class Main {\n\n    /**\n     * @param args\n     */\n    public static void main(String[] args) {\n        try {\n            Class.forName(\"jdk.internal.util.Preconditions\").newInstance();\n        } catch (Exception e) {\n            // noop\n        }\n    }\n}\n"
  },
  {
    "path": "src/it/jpms_patch-module/src/test/java/org/maven/test/MainTest.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.maven.test;\n\npublic class MainTest {\n\n    /**\n     * @param args\n     */\n    public static void main(String[] args) {\n        Main.main(args);\n    }\n}\n"
  },
  {
    "path": "src/it/jpms_patch-module/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 args = new File( basedir, 'target/javac-test.args' ).text;\nassert args.contains( '--patch-module' )\n/*\n * A previous version of this file made more extensive checks of `jpms.args` file content.\n * But the `jpms.args` file is no longer generated since Maven compiler plugin version 4.\n */\n\nassert new File( basedir, \"./target/classes/module-info.class\" ).exists()\nassert new File( basedir, \"target/test-classes/org/maven/test/MainTest.class\" ).exists()\n"
  },
  {
    "path": "src/it/mcompiler-106/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 compile\n"
  },
  {
    "path": "src/it/mcompiler-106/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler-106</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <fork>true</fork>\n          <compilerArgs>\n            <arg>-Xlint</arg>\n            <arg>-Averbose=true</arg>\n          </compilerArgs>\n        </configuration>\n      </plugin>\n    </plugins>\n\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/mcompiler-106/src/main/java/MyClass.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 foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/mcompiler-106/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 */\ndef logFile = new File( basedir, 'target/javac.args' )\nassert logFile.exists()\ncontent = logFile.text\n\nassert content.contains( '-Averbose=true' )\nassert content.contains( '-Xlint' )\n"
  },
  {
    "path": "src/it/mcompiler-120/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 compile\ninvoker.buildResult = failure\n"
  },
  {
    "path": "src/it/mcompiler-120/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler-120</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <name>Werror warnings build</name>\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\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <verbose>true</verbose>\n          <debug>true</debug>\n          <optimize>true</optimize>\n          <showDeprecation>true</showDeprecation>\n          <showWarnings>true</showWarnings>\n          <compilerArgs>\n            <arg>-Werror</arg>\n            <arg>-Xlint:all,-options,-path</arg>\n          </compilerArgs>\n          <fork>true</fork>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/mcompiler-120/src/main/java/org/maven/test/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.maven.test;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class Main {\n    /**\n     * @param args\n     */\n    public static void main(String[] args) {\n        List blah = new ArrayList();\n        blah.add(\"hello\");\n    }\n}\n"
  },
  {
    "path": "src/it/mcompiler-120/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 */\ndef logFile = new File( basedir, 'build.log' )\nassert logFile.exists()\ncontent = logFile.text\n\n/*\n * The message expected by this test was \"unchecked call to add(E) as a member of the raw type List\".\n * But we cannot test that message because it is locale-dependent. Check only a few keywords instead.\n */\nassert content.contains( 'add(E)' )\nassert content.contains( 'List' ) // May be `List` or `java.util.List`.\nassert content.contains( 'COMPILATION ERROR:' )\nassert content.contains( 'CompilationFailureException' ) // In debug level logs.\nassert !content.contains( 'invalid flag' )\n"
  },
  {
    "path": "src/it/mcompiler-135/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=compile\n"
  },
  {
    "path": "src/it/mcompiler-135/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler-135</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <fork>true</fork>\n          <compilerArguments>\n            <Averbose>true</Averbose>\n            <AaddResDir>src/main/webapp</AaddResDir>\n          </compilerArguments>\n        </configuration>\n      </plugin>\n    </plugins>\n\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/mcompiler-135/src/main/java/MyClass.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 foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/mcompiler-179/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 = compile\ninvoker.buildResult = failure\n"
  },
  {
    "path": "src/it/mcompiler-179/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler-179</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\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>@project.version@</version>\n          <configuration>\n            <compilerArgument>-Xlint:all</compilerArgument>\n            <compilerArguments>\n              <Werror />\n            </compilerArguments>\n            <showWarnings>true</showWarnings>\n            <showDeprecation>true</showDeprecation>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/mcompiler-179/src/main/java/org/maven/test/MyClass.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.maven.test;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class MyClass {\n\n    public void foo() {\n        List blah = new ArrayList();\n        blah.add(\"hello\");\n    }\n\n    public void bar() {\n        int a = \"error\";\n    }\n}\n"
  },
  {
    "path": "src/it/mcompiler-179/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 logFile = new File( basedir, 'build.log' )\nassert logFile.exists()\ncontent = logFile.text\n\n/*\n * The message expected by this test was \"[WARNING] unchecked call\" (the full message\n * is actually \"unchecked call to add(E) as a member of the raw type java.util.List\").\n * But we cannot test that message because it is locale-dependent.\n * Check only a few keywords instead.\n */\nassert content.contains( '[WARNING]' )\nassert content.contains( 'add(E)' )\nassert content.contains( 'List' ) // May be `List` or `java.util.List`.\nassert content.contains( 'COMPILATION ERROR:' )\nassert content.contains( 'CompilationFailureException' ) // In debug level logs.\n"
  },
  {
    "path": "src/it/mcompiler-182/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 compile\ninvoker.goals.2 = org.codehaus.gmaven:groovy-maven-plugin:execute\ninvoker.goals.3 = compile\ninvoker.buildResult.3 = failure\n"
  },
  {
    "path": "src/it/mcompiler-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\" 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.compiler.it</groupId>\n  <artifactId>mcompiler-182</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <description>This IT tests what happens if the class name (and filename) of BeanA gets changed.\n    In this case 'mvn compile' (without a clean) should fail as BeanA2\n    still uses the old BeanA.</description>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n    <plugins>\n      <plugin>\n        <!-- Called as second invoker goal to simulate file adjustment -->\n        <groupId>org.codehaus.gmaven</groupId>\n        <artifactId>groovy-maven-plugin</artifactId>\n        <version>2.1.1</version>\n        <configuration>\n          <source>def beanAFile = new File( project.basedir, 'src/main/java/foo/BeanA.java' )\n\n            new File( project.basedir, 'src/main/java/foo/BEANa.java' ).withWriter { file -&gt;\n              beanAFile.eachLine { line -&gt;\n                file.writeLine( line.replace( 'BeanA', 'BEANa' ) )\n              }\n            }\n\n            beanAFile.delete()</source>\n        </configuration>\n        <dependencies>\n          <dependency>\n            <groupId>org.codehaus.groovy</groupId>\n            <artifactId>groovy-all</artifactId>\n            <version>2.4.21</version>\n          </dependency>\n        </dependencies>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/mcompiler-182/src/main/java/foo/BeanA.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 foo;\n\n/**\n * dumb test bean\n */\npublic class BeanA {\n\n    private int i, y;\n\n    public int getI() {\n        return i;\n    }\n\n    public void setI(int i) {\n        this.i = i;\n    }\n}\n"
  },
  {
    "path": "src/it/mcompiler-182/src/main/java/foo/BeanA2.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 foo;\n\n/**\n * dumb test bean\n */\npublic class BeanA2 {\n\n    private int i;\n    private BeanA beanA;\n\n    public int getI() {\n        return beanA.getI();\n    }\n\n    public void setI(int i) {\n        beanA.setI(i);\n    }\n}\n"
  },
  {
    "path": "src/it/mcompiler-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 */\ndef logFile = new File( basedir, 'build.log' )\nassert logFile.exists()\ncontent = logFile.text\n\nassert content.contains( 'COMPILATION ERROR:' )\nassert content.contains( 'CompilationFailureException' ) // In debug level logs.\n\nassert !new File( basedir, 'target/classes/foo/BeanA.class' ).exists();\n"
  },
  {
    "path": "src/it/mcompiler-21_class-remove/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 compile\ninvoker.goals.2 = org.codehaus.gmaven:groovy-maven-plugin:execute\ninvoker.goals.3 = compile\ninvoker.buildResult.3 = failure\n"
  },
  {
    "path": "src/it/mcompiler-21_class-remove/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler-21_class-remove</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <description>This IT tests what happens if a single class BeanA is removed.\n    In this case 'mvn compile' (without a clean) should fail as BeanA2\n    still uses the removed class BeanA.</description>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n    <plugins>\n      <plugin>\n        <!-- Called as second invoker goal to simulate file adjustment -->\n        <groupId>org.codehaus.gmaven</groupId>\n        <artifactId>groovy-maven-plugin</artifactId>\n        <version>2.1.1</version>\n        <configuration>\n          <source>def beanAFile = new File( project.basedir, 'src/main/java/BeanA.java' )\n\n            beanAFile.delete()</source>\n        </configuration>\n        <dependencies>\n          <dependency>\n            <groupId>org.codehaus.groovy</groupId>\n            <artifactId>groovy-all</artifactId>\n            <version>2.4.21</version>\n          </dependency>\n        </dependencies>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/mcompiler-21_class-remove/src/main/java/BeanA.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 foo;\n\n/**\n * dumb test bean\n */\npublic class BeanA {\n\n    private int i, y;\n\n    public int getI() {\n        return i;\n    }\n\n    public void setI(int i) {\n        this.i = i;\n    }\n}\n"
  },
  {
    "path": "src/it/mcompiler-21_class-remove/src/main/java/BeanA2.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 foo;\n\n/**\n * dumb test bean\n */\npublic class BeanA2 {\n\n    private int i;\n    private BeanA beanA;\n\n    public int getI() {\n        return beanA.getI();\n    }\n\n    public void setI(int i) {\n        beanA.setI(i);\n    }\n}\n"
  },
  {
    "path": "src/it/mcompiler-21_class-remove/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 */\ndef logFile = new File( basedir, 'build.log' )\nassert logFile.exists()\ncontent = logFile.text\n\nassert content.contains( 'COMPILATION ERROR:' )\nassert content.contains( 'CompilationFailureException' ) // In debug level logs.\n"
  },
  {
    "path": "src/it/mcompiler-21_methodname-change/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 compile\ninvoker.goals.2 = org.codehaus.gmaven:groovy-maven-plugin:execute\ninvoker.goals.3 = compile\ninvoker.buildResult.3 = failure\n"
  },
  {
    "path": "src/it/mcompiler-21_methodname-change/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\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>mcompiler-21_methodname-change</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <description>This IT tests what happens if the method name in a single class BeanA gets changed.\n    In this case 'mvn compile' (without a clean) should fail as  BeanA2\n    still uses the old method of BeanA.</description>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n          <configuration>\n            <incrementalCompilation>sources,rebuild-on-change</incrementalCompilation>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n    <plugins>\n      <plugin>\n        <!-- Called as second invoker goal to simulate file adjustment -->\n        <groupId>org.codehaus.gmaven</groupId>\n        <artifactId>groovy-maven-plugin</artifactId>\n        <version>2.1.1</version>\n        <configuration>\n          <source>def beanAFile = new File( project.basedir, 'src/main/java/BeanA.java' )\n\n            processFileInplace( beanAFile ) { text -&gt;\n              text.replaceAll( /getI/, 'getI_doesntexistanymore')\n            }\n\n            def processFileInplace(file, Closure processText) {\n              def text = file.text\n              file.write(processText(text))\n            }</source>\n        </configuration>\n        <dependencies>\n          <dependency>\n            <groupId>org.codehaus.groovy</groupId>\n            <artifactId>groovy-all</artifactId>\n            <version>2.4.21</version>\n          </dependency>\n        </dependencies>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/mcompiler-21_methodname-change/src/main/java/BeanA.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 foo;\n\n/**\n * dumb test bean\n */\npublic class BeanA {\n\n    private int i, y;\n\n    public int getI() {\n        return i;\n    }\n\n    public void setI(int i) {\n        this.i = i;\n    }\n}\n"
  },
  {
    "path": "src/it/mcompiler-21_methodname-change/src/main/java/BeanA2.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 foo;\n\n/**\n * dumb test bean\n */\npublic class BeanA2 {\n\n    private int i;\n    private BeanA beanA;\n\n    public int getI() {\n        return beanA.getI();\n    }\n\n    public void setI(int i) {\n        beanA.setI(i);\n    }\n}\n"
  },
  {
    "path": "src/it/mcompiler-21_methodname-change/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 */\ndef logFile = new File( basedir, 'build.log' )\nassert logFile.exists()\ncontent = logFile.text\n\nassert content.contains( 'COMPILATION ERROR:' )\nassert content.contains( 'CompilationFailureException' ) // In debug level logs.\n"
  },
  {
    "path": "src/it/modular-sources/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.1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.1.0 http://maven.apache.org/xsd/maven-4.1.0.xsd\">\n  <modelVersion>4.1.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>modular-sources</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>jar</packaging>\n  <name>Modular project in Maven 4</name>\n\n  <dependencies>\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-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n\n    <sources>\n      <source>\n        <module>org.foo</module>\n        <directory>src/org.foo/main/java</directory>\n      </source>\n      <source>\n        <module>org.foo</module>\n        <directory>src/org.foo/test/java</directory>\n        <scope>test</scope>\n      </source>\n      <source>\n        <module>org.bar</module>\n        <directory>src/org.bar/main/java</directory>\n      </source>\n      <source>\n        <module>org.bar</module>\n        <directory>src/org.bar/test/java</directory>\n        <scope>test</scope>\n      </source>\n    </sources>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/modular-sources/src/org.bar/main/java/bar/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 bar;\n\npublic class App {\n    public static void main(String[] args) {\n        foo.App.main(args);\n        System.out.println(\"Bar\");\n    }\n}\n"
  },
  {
    "path": "src/it/modular-sources/src/org.bar/main/java/module-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 */\nmodule org.bar {\n    requires org.foo;\n}\n"
  },
  {
    "path": "src/it/modular-sources/src/org.bar/test/java/bar/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 bar;\n\nimport org.junit.jupiter.api.Test;\n\n/**\n * Verifies that the compiler has access to JUnit and the main code.\n */\npublic class AppTest {\n    @Test\n    public void testMain() {\n        App.main(null);\n    }\n}\n"
  },
  {
    "path": "src/it/modular-sources/src/org.foo/main/java/foo/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 foo;\n\npublic class App {\n    public static void main(String[] args) {\n        System.out.println(\"Foo\");\n    }\n}\n"
  },
  {
    "path": "src/it/modular-sources/src/org.foo/main/java/module-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 */\nmodule org.foo {\n    exports foo;\n}\n"
  },
  {
    "path": "src/it/modular-sources/src/org.foo/test/java/foo/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 foo;\n\nimport org.junit.jupiter.api.Test;\n\n/**\n * Verifies that the compiler has access to JUnit and the main code.\n */\npublic class AppTest {\n    @Test\n    public void testMain() {\n        App.main(null);\n    }\n}\n"
  },
  {
    "path": "src/it/modular-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 */\n\nimport java.util.jar.JarFile\n\nassert new File( basedir, \"target/classes/org.foo/module-info.class\").exists()\nassert new File( basedir, \"target/classes/org.foo/foo/App.class\").exists()\nassert new File( basedir, \"target/test-classes/org.foo/foo/AppTest.class\").exists()\n\nassert new File( basedir, \"target/classes/org.bar/module-info.class\").exists()\nassert new File( basedir, \"target/classes/org.bar/bar/App.class\").exists()\nassert new File( basedir, \"target/test-classes/org.bar/bar/AppTest.class\").exists()\n"
  },
  {
    "path": "src/it/module-info-patch/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.1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.1.0 http://maven.apache.org/xsd/maven-4.1.0.xsd\">\n  <modelVersion>4.1.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>module-info-patch</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>jar</packaging>\n  <name>Modular project with module-info-patch files</name>\n\n  <dependencies>\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-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n\n    <sources>\n      <source>\n        <module>org.foo</module>\n        <directory>src/org.foo/main/java</directory>\n      </source>\n      <source>\n        <module>org.foo</module>\n        <directory>src/org.foo/test/java</directory>\n        <scope>test</scope>\n      </source>\n      <source>\n        <module>org.bar</module>\n        <directory>src/org.bar/main/java</directory>\n      </source>\n      <source>\n        <module>org.bar</module>\n        <directory>src/org.bar/test/java</directory>\n        <scope>test</scope>\n      </source>\n    </sources>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/module-info-patch/src/org.bar/main/java/bar/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 bar;\n\npublic class App {\n    public static void main(String[] args) {\n        System.out.println(\"Bar\");\n    }\n}\n"
  },
  {
    "path": "src/it/module-info-patch/src/org.bar/main/java/module-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 */\nmodule org.bar {\n    requires org.foo;\n}\n"
  },
  {
    "path": "src/it/module-info-patch/src/org.bar/test/java/bar/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 bar;\n\nimport org.junit.jupiter.api.Test;\n\n/**\n * Verifies that the compiler has access to JUnit and the main code.\n */\npublic class AppTest {\n    @Test\n    public void testMain() {\n        App.main(null);\n\n        // The following requires that the `foo` package from the `org.foo` module is exported\n        // to this `org.bar` module, which is declared in the `module-info-patch.maven` file.\n        foo.App.main(null);\n    }\n}\n"
  },
  {
    "path": "src/it/module-info-patch/src/org.bar/test/java/module-info-patch.maven",
    "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\npatch-module org.bar {\n    add-modules TEST-MODULE-PATH;\n    add-reads org.junit.jupiter.api;\n}\n"
  },
  {
    "path": "src/it/module-info-patch/src/org.foo/main/java/foo/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 foo;\n\npublic class App {\n    public static void main(String[] args) {\n        System.out.println(\"Foo\");\n    }\n}\n"
  },
  {
    "path": "src/it/module-info-patch/src/org.foo/main/java/module-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 */\nmodule org.foo {\n    // Do not export `foo` as we want to test `--add-opens` options.\n}\n"
  },
  {
    "path": "src/it/module-info-patch/src/org.foo/test/java/foo/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 foo;\n\nimport org.junit.jupiter.api.Test;\n\n/**\n * Verifies that the compiler has access to JUnit and the main code.\n */\npublic class AppTest {\n    @Test\n    public void testMain() {\n        App.main(null);\n    }\n}\n"
  },
  {
    "path": "src/it/module-info-patch/src/org.foo/test/java/module-info-patch.maven",
    "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\npatch-module org.foo {\n    add-modules TEST-MODULE-PATH;\n\n    // Similar to `requires` in module-info.\n    // Accept also TEST-MODULE-PATH (Maven-specific).\n    add-reads org.junit.jupiter.api;\n\n    // Similar to `exports` in module-info.\n    add-exports foo to org.bar;\n}\n"
  },
  {
    "path": "src/it/module-info-patch/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.JarFile\n\nassert new File( basedir, \"target/classes/org.foo/module-info.class\").exists()\nassert new File( basedir, \"target/classes/org.foo/foo/App.class\").exists()\nassert new File( basedir, \"target/test-classes/org.foo/foo/AppTest.class\").exists()\n\nassert new File( basedir, \"target/classes/org.bar/module-info.class\").exists()\nassert new File( basedir, \"target/classes/org.bar/bar/App.class\").exists()\nassert new File( basedir, \"target/test-classes/org.bar/bar/AppTest.class\").exists()\n"
  },
  {
    "path": "src/it/multirelease-on-classpath/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.1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.1.0 http://maven.apache.org/xsd/maven-4.1.0.xsd\">\n  <modelVersion>4.1.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>multirelease-on-classpath</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>jar</packaging>\n  <name>Multirelease in Maven 4</name>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n\n    <sources>\n      <source>\n        <directory>src/main/java</directory>\n        <targetVersion>15</targetVersion>\n      </source>\n      <source>\n        <directory>src/main/java_16</directory>\n        <targetVersion>16</targetVersion>\n      </source>\n      <source>\n        <directory>src/main/java_17</directory>\n        <targetVersion>17</targetVersion>\n      </source>\n    </sources>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/multirelease-on-classpath/src/main/java/foo/MainFile.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 foo;\n\n/**\n * Test {@code &lt;Source&gt;}.\n * Another {@code &lt;Source&gt;}.\n */\npublic class MainFile {\n    public static void main(String[] args) {\n        System.out.println(\"MainFile\");\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-on-classpath/src/main/java/foo/OtherFile.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 foo;\n\n/**\n * Test {@code &lt;Source&gt;}.\n * Another {@code &lt;Source&gt;}.\n */\npublic class OtherFile {\n    public static void main(String[] args) {\n        System.out.println(\"OtherFile\");\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-on-classpath/src/main/java_16/foo/OtherFile.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 foo;\n\n/**\n * Test {@code &lt;Source&gt;}.\n * Another {@code &lt;Source&gt;}.\n */\npublic class OtherFile {\n    public static void main(String[] args) {\n        System.out.println(\"OtherFile on Java 16\");\n        MainFile.main(args); // Verify that we have access to the base version.\n    }\n\n    static void requireJava16() {\n        System.out.println(\"Method available only on Java 16+\");\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-on-classpath/src/main/java_17/foo/YetAnotherFile.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 foo;\n\n/**\n * Test {@code &lt;Source&gt;}.\n * Another {@code &lt;Source&gt;}.\n */\nclass YetAnotherFile {\n    static void main(String[] args) {\n        System.out.println(\"YetAnotherFile on Java 17\");\n        MainFile.main(args); // Verify that we have access to the base version.\n        OtherFile.requireJava16(); // Verify that we have access to the Java 16 version.\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-on-classpath/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.JarFile\n\ndef baseVersion = 59; // Java 15\ndef nextVersion = 60; // Java 16\ndef lastVersion = 61; // Java 17\n\nassert baseVersion == getMajor(new File( basedir, \"target/classes/foo/MainFile.class\"))\nassert baseVersion == getMajor(new File( basedir, \"target/classes/foo/OtherFile.class\"))\nassert nextVersion == getMajor(new File( basedir, \"target/classes/META-INF/versions/16/foo/OtherFile.class\"))\nassert lastVersion == getMajor(new File( basedir, \"target/classes/META-INF/versions/17/foo/YetAnotherFile.class\"))\n\nint getMajor(File file)\n{\n  assert file.exists()\n  def dis = new DataInputStream(new FileInputStream(file))\n  final String firstFourBytes = Integer.toHexString(dis.readUnsignedShort()) + Integer.toHexString(dis.readUnsignedShort())\n  if (!firstFourBytes.equalsIgnoreCase(\"cafebabe\"))\n  {\n    throw new IllegalArgumentException(dataSourceName + \" is not a Java .class file.\")\n  }\n  final int minorVersion = dis.readUnsignedShort()\n  final int majorVersion = dis.readUnsignedShort()\n\n  dis.close()\n  return majorVersion\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/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 = verify\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/multirelease/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  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>multirelease-parent</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>multirelease</artifactId>\n\n  <name>Distribution multirelease jar</name>\n\n  <dependencies>\n    <!-- add multirelease-base dependencies if any -->\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <artifactId>maven-assembly-plugin</artifactId>\n        <version>@version.maven-assembly-plugin@</version>\n        <configuration>\n          <appendAssemblyId>false</appendAssemblyId>\n          <descriptors>\n            <descriptor>src/assembly/mrjar.xml</descriptor>\n          </descriptors>\n          <archive>\n            <manifestEntries>\n              <Multi-Release>true</Multi-Release>\n            </manifestEntries>\n          </archive>\n        </configuration>\n        <executions>\n          <execution>\n            <id>make-assembly</id>\n            <goals>\n              <goal>single</goal>\n            </goals>\n            <phase>package</phase>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/multirelease/src/assembly/mrjar.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<assembly xmlns=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3\"\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xsi:schemaLocation=\"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd\">\n  <id>mvjar</id>\n  <formats>\n    <format>jar</format>\n  </formats>\n  <includeBaseDirectory>false</includeBaseDirectory>\n  <moduleSets>\n    <moduleSet>\n      <useAllReactorProjects>true</useAllReactorProjects>\n      <includes>\n        <include>org.apache.maven.plugins.compiler.it:multirelease-base</include>\n      </includes>\n      <binaries>\n        <unpack>true</unpack>\n        <includeDependencies>false</includeDependencies>\n      </binaries>\n    </moduleSet>\n    <moduleSet>\n      <useAllReactorProjects>true</useAllReactorProjects>\n      <includes>\n        <include>org.apache.maven.plugins.compiler.it:multirelease-nine</include>\n      </includes>\n      <binaries>\n        <outputDirectory>META-INF/versions/9</outputDirectory>\n        <unpack>true</unpack>\n        <includeDependencies>false</includeDependencies>\n        <unpackOptions>\n          <excludes>\n            <exclude>/META-INF/**</exclude>\n          </excludes>\n        </unpackOptions>\n      </binaries>\n    </moduleSet>\n  </moduleSets>\n</assembly>\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/multirelease-base/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  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>multirelease-parent</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>multirelease-base</artifactId>\n\n  <name>Base</name>\n\n  <properties>\n    <maven.install.skip>true</maven.install.skip>\n    <maven.compiler.release>8</maven.compiler.release>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/base/Base.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 base;\n\npublic class Base {\n\n    public static String get() {\n        return \"BASE\";\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/mr/A.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 mr;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> 8\";\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return java.time.LocalDateTime.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/multirelease-base/src/main/java/mr/I.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 mr;\n\npublic interface I {\n    Class<?> introducedClass();\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/multirelease-base/src/test/java/mr/ATest.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 mr;\n\nimport org.junit.Ignore;\nimport org.junit.Test;\n\nimport static org.hamcrest.CoreMatchers.is;\nimport static org.junit.Assert.assertThat;\nimport static org.junit.Assume.assumeThat;\n\npublic class ATest {\n\n    private static final String javaVersion = System.getProperty(\"java.version\");\n\n    @Test\n    public void testGet8() throws Exception {\n        //        assumeThat( javaVersion, is( \"8\" ) );\n\n        assertThat(A.getString(), is(\"BASE -> 8\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.time.LocalDateTime\"));\n    }\n\n    @Test\n    @Ignore(\"Maven module only creates Java 8 classes\")\n    public void testGet9() throws Exception {\n        assumeThat(javaVersion, is(\"9\"));\n\n        assertThat(A.getString(), is(\"BASE -> 9\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.lang.Module\"));\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/multirelease-nine/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  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>multirelease-parent</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>multirelease-nine</artifactId>\n\n  <name>Version 9</name>\n\n  <properties>\n    <maven.compiler.release>9</maven.compiler.release>\n    <maven.install.skip>true</maven.install.skip>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>multirelease-base</artifactId>\n      <version>${project.version}</version>\n    </dependency>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/multirelease-nine/src/main/java/mr/A.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 mr;\n\nimport java.util.Optional;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> \" + Optional.of(\"9\").get();\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return Module.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/multirelease-nine/src/test/java/mr/ATest.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 mr;\n\nimport org.junit.Ignore;\nimport org.junit.Test;\n\nimport static org.hamcrest.CoreMatchers.is;\nimport static org.junit.Assert.assertThat;\nimport static org.junit.Assume.assumeThat;\n\npublic class ATest {\n\n    private static final String javaVersion = System.getProperty(\"java.version\");\n\n    @Test\n    @Ignore(\"Maven module only creates Java 9 classes\")\n    public void testGet8() throws Exception {\n        assumeThat(javaVersion, is(\"8\"));\n\n        assertThat(A.getString(), is(\"BASE -> 8\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.time.LocalDateTime\"));\n    }\n\n    @Test\n    public void testGet9() throws Exception {\n        //        assumeThat( javaVersion, is( \"9\" ) );\n\n        assertThat(A.getString(), is(\"BASE -> 9\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.lang.Module\"));\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>multirelease-parent</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <modules>\n    <module>multirelease-base</module>\n    <module>multirelease-nine</module>\n    <module>multirelease</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>@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\n</project>\n"
  },
  {
    "path": "src/it/multirelease-patterns/multimodule/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.JarFile\n\ndef mrjar = new JarFile(new File(basedir,'multirelease/target/multirelease-1.0.0-SNAPSHOT.jar'))\n\nassert mrjar.manifest.mainAttributes.getValue('Multi-Release') == 'true'\n\nassert (je = mrjar.getEntry('base/Base.class')) != null\nassert 52 == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('mr/A.class')) != null\nassert 52 == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('mr/I.class')) != null\nassert 52 == getMajor(mrjar.getInputStream(je))\n\nassert (je = mrjar.getEntry('META-INF/versions/9/mr/A.class')) != null\nassert 53 == getMajor(mrjar.getInputStream(je))\n\n/*\n  base\n  base/Base.class\n  mr\n  mr/A.class\n  mr/I.class\n  META-INF\n  META-INF/MANFEST.MF\n  META-INF/versions\n  META-INF/versions/9\n  META-INF/versions/9/mr\n  META-INF/versions/9/mr/A.class\n  META-INF/maven\n  META-INF/maven/multirelease\n  META-INF/maven/multirelease/multirelease\n  META-INF/maven/multirelease/multirelease/pom.xml\n  META-INF/maven/multirelease/multirelease/pom.properties\n*/\nassert mrjar.entries().size() == 16\n\nint getMajor(InputStream is)\n{\n  def dis = new DataInputStream(is)\n  final String firstFourBytes = Integer.toHexString(dis.readUnsignedShort()) + Integer.toHexString(dis.readUnsignedShort())\n  if (!firstFourBytes.equalsIgnoreCase(\"cafebabe\"))\n  {\n    throw new IllegalArgumentException(dataSourceName + \" is NOT a Java .class file.\")\n  }\n  final int minorVersion = dis.readUnsignedShort()\n  final int majorVersion = dis.readUnsignedShort()\n\n  is.close();\n  return majorVersion;\n}\n\n"
  },
  {
    "path": "src/it/multirelease-patterns/multiproject/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\n\ninvoker.goals.2=install\ninvoker.project.2=multirelease-base\ninvoker.profiles.2=!nine\n\ninvoker.goals.3=install\ninvoker.project.3=multirelease-nine\n\ninvoker.goals.4=verify\ninvoker.project.4=multirelease-base\n"
  },
  {
    "path": "src/it/multirelease-patterns/multiproject/multirelease-base/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.compiler.it</groupId>\n    <artifactId>multirelease-parent</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>multirelease</artifactId>\n\n  <name>Base</name>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <resources>\n      <resource>\n        <filtering>true</filtering>\n        <directory>src/main/resources</directory>\n      </resource>\n      <resource>\n        <filtering>false</filtering>\n        <directory>target/generated-resources</directory>\n      </resource>\n    </resources>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n\n  <profiles>\n    <profile>\n      <id>nine</id>\n      <activation>\n        <activeByDefault>true</activeByDefault>\n      </activation>\n      <dependencies>\n        <dependency>\n          <groupId>org.apache.maven.plugins.compiler.it</groupId>\n          <artifactId>multirelease-nine</artifactId>\n          <version>1.0.0-SNAPSHOT</version>\n          <scope>provided</scope>\n          <exclusions>\n            <exclusion>\n              <groupId>${project.groupId}</groupId>\n              <artifactId>${project.artifactId}</artifactId>\n            </exclusion>\n          </exclusions>\n        </dependency>\n      </dependencies>\n      <build>\n        <pluginManagement>\n          <plugins>\n            <plugin>\n              <groupId>org.apache.maven.plugins</groupId>\n              <artifactId>maven-jar-plugin</artifactId>\n              <configuration>\n                <archive>\n                  <manifestEntries>\n                    <Multi-Release>true</Multi-Release>\n                  </manifestEntries>\n                </archive>\n              </configuration>\n            </plugin>\n          </plugins>\n        </pluginManagement>\n        <plugins>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-dependency-plugin</artifactId>\n            <executions>\n              <execution>\n                <id>add-java9-supplement</id>\n                <goals>\n                  <goal>unpack-dependencies</goal>\n                </goals>\n                <phase>generate-resources</phase>\n                <configuration>\n                  <includeGroupIds>org.apache.maven.plugins.compiler.it</includeGroupIds>\n                  <includeArtifactIds>multirelease-nine</includeArtifactIds>\n                  <excludeTransitive>true</excludeTransitive>\n                  <includes>**/*.class</includes>\n                  <outputDirectory>${project.build.directory}/generated-resources/META-INF/versions/9</outputDirectory>\n                </configuration>\n              </execution>\n            </executions>\n          </plugin>\n        </plugins>\n      </build>\n    </profile>\n  </profiles>\n</project>\n"
  },
  {
    "path": "src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/base/Base.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 base;\n\npublic class Base {\n\n    public static String get() {\n        return \"BASE\";\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/mr/A.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 mr;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> 8\";\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return java.time.LocalDateTime.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multiproject/multirelease-base/src/main/java/mr/I.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 mr;\n\npublic interface I {\n    Class<?> introducedClass();\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multiproject/multirelease-base/src/test/java/mr/ATest.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 mr;\n\nimport org.junit.Ignore;\nimport org.junit.Test;\n\nimport static org.hamcrest.CoreMatchers.is;\nimport static org.junit.Assert.assertThat;\nimport static org.junit.Assume.assumeThat;\n\npublic class ATest {\n\n    private static final String javaVersion = System.getProperty(\"java.version\");\n\n    @Test\n    public void testGet8() throws Exception {\n        //        assumeThat( javaVersion, is( \"8\" ) );\n\n        assertThat(A.getString(), is(\"BASE -> 8\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.time.LocalDateTime\"));\n    }\n\n    @Test\n    @Ignore(\"Maven module only creates Java 8 classes\")\n    public void testGet9() throws Exception {\n        assumeThat(javaVersion, is(\"9\"));\n\n        assertThat(A.getString(), is(\"BASE -> 9\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.lang.Module\"));\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multiproject/multirelease-nine/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  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>multirelease-parent</artifactId>\n    <version>1.0.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>multirelease-nine</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>multirelease</artifactId>\n      <version>1.0.0-SNAPSHOT</version>\n    </dependency>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <configuration>\n            <release>17</release>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/multirelease-patterns/multiproject/multirelease-nine/src/main/java/mr/A.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 mr;\n\nimport java.util.Optional;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> \" + Optional.of(\"9\").get();\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return Module.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multiproject/multirelease-nine/src/test/java/mr/ATest.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 mr;\n\nimport org.junit.Ignore;\nimport org.junit.Test;\n\nimport static org.hamcrest.CoreMatchers.is;\nimport static org.junit.Assert.assertThat;\nimport static org.junit.Assume.assumeThat;\n\npublic class ATest {\n\n    private static final String javaVersion = System.getProperty(\"java.version\");\n\n    @Test\n    @Ignore(\"Maven module only creates Java 9 classes\")\n    public void testGet8() throws Exception {\n        assumeThat(javaVersion, is(\"8\"));\n\n        assertThat(A.getString(), is(\"BASE -> 8\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.time.LocalDateTime\"));\n    }\n\n    @Test\n    public void testGet9() throws Exception {\n        //        assumeThat( javaVersion, is( \"9\" ) );\n\n        assertThat(A.getString(), is(\"BASE -> 9\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.lang.Module\"));\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/multiproject/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>multirelease-parent</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n          <configuration>\n            <release>16</release>\n          </configuration>\n        </plugin>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-dependency-plugin</artifactId>\n          <version>@version.maven-dependency-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-surefire-plugin</artifactId>\n          <version>@version.maven-surefire@</version>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/multirelease-patterns/multiproject/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.JarFile\n\ndef log = new File(basedir,'build.log')\nassert 1 == log.text.count('[INFO] Building multirelease-parent 1.0.0-SNAPSHOT') : 'parent should be built once'\nassert 2 == log.text.count('[INFO] Building Base 1.0.0-SNAPSHOT')                : 'base should be built twice'\nassert 1 == log.text.count('[INFO] Building multirelease-nine 1.0.0-SNAPSHOT')   : 'nine should be built once'\n\ndef baseVersion = 60 // Java 16\ndef nextVersion = 61; // Java 17\n\ndef mrjar = new JarFile(new File(basedir,'multirelease-base/target/multirelease-1.0.0-SNAPSHOT.jar'))\n\nassert mrjar.manifest.mainAttributes.getValue('Multi-Release') == 'true' : 'Multi-Release attribute in manifest should be true'\n\nassert (je = mrjar.getEntry('base/Base.class')) != null : 'jar should contain base/Base.class'\nassert baseVersion == getMajor(mrjar.getInputStream(je)) : 'base/Base.class has unexpected major bytecode version'\nassert (je = mrjar.getEntry('mr/A.class')) != null      : 'jar should contain mr/A.class'\nassert baseVersion == getMajor(mrjar.getInputStream(je)) : 'mr/A.class shas unexpected major bytecode version'\nassert (je = mrjar.getEntry('mr/I.class')) != null      : 'jar should contain mr/I.class'\nassert baseVersion == getMajor(mrjar.getInputStream(je)) : 'mr/I.class has unexpected major bytecode version'\n\nassert (je = mrjar.getEntry('META-INF/versions/9/mr/A.class')) != null : 'jar should contain META-INF/versions/9/mr/A.class'\nassert nextVersion == getMajor(mrjar.getInputStream(je))                        : 'META-INF/versions/9/mr/A.class has unexpected major bytecode version'\n\n/*\n  base\n  base/Base.class\n  mr\n  mr/A.class\n  mr/I.class\n  META-INF\n  META-INF/MANFEST.MF\n  META-INF/versions\n  META-INF/versions/9\n  META-INF/versions/9/mr\n  META-INF/versions/9/mr/A.class\n  META-INF/maven\n  META-INF/maven/multirelease\n  META-INF/maven/multirelease/multirelease\n  META-INF/maven/multirelease/multirelease/pom.xml\n  META-INF/maven/multirelease/multirelease/pom.properties\n*/\nassert mrjar.entries().size() == 16\n\nint getMajor(InputStream is)\n{\n  def dis = new DataInputStream(is)\n  final String firstFourBytes = Integer.toHexString(dis.readUnsignedShort()) + Integer.toHexString(dis.readUnsignedShort())\n  if (!firstFourBytes.equalsIgnoreCase(\"cafebabe\"))\n  {\n    throw new IllegalArgumentException(dataSourceName + \" is NOT a Java .class file.\")\n  }\n  final int minorVersion = dis.readUnsignedShort()\n  final int majorVersion = dis.readUnsignedShort()\n\n  is.close();\n  return majorVersion;\n}\n\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-modular/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.\ninvoker.goals = verify\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-modular/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>multirelease</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <name>Single Project :: Runtime</name>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</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-failsafe-plugin</artifactId>\n          <version>@version.maven-surefire@</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          <configuration>\n            <!-- this shows that the Java 9 code isn't tested -->\n            <testFailureIgnore>true</testFailureIgnore>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <release>8</release>\n        </configuration>\n        <executions>\n          <execution>\n            <id>jdk9</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>9</release>\n              <compileSourceRoots>\n                <compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>\n              </compileSourceRoots>\n              <multiReleaseOutput>true</multiReleaseOutput>\n            </configuration>\n          </execution>\n          <execution>\n            <id>jdk17</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>17</release>\n              <compileSourceRoots>\n                <compileSourceRoot>${project.basedir}/src/main/java17</compileSourceRoot>\n              </compileSourceRoots>\n              <multiReleaseOutput>true</multiReleaseOutput>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <!-- Rerun unittests with the multirelease jar, cannot be done with exploded directory of classes  -->\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-failsafe-plugin</artifactId>\n        <configuration>\n          <includes>\n            <include>**/*Test.java</include>\n          </includes>\n        </configuration>\n        <executions>\n          <execution>\n            <goals>\n              <goal>integration-test</goal>\n              <goal>verify</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n  <profiles>\n    <profile>\n      <id>jdk9</id>\n      <activation>\n        <jdk>[9,)</jdk>\n      </activation>\n      <build>\n        <pluginManagement>\n          <plugins>\n            <plugin>\n              <groupId>org.apache.maven.plugins</groupId>\n              <artifactId>maven-jar-plugin</artifactId>\n              <executions>\n                <execution>\n                  <id>default-jar</id>\n                  <configuration>\n                    <archive>\n                      <manifestEntries>\n                        <Multi-Release>true</Multi-Release>\n                      </manifestEntries>\n                    </archive>\n                  </configuration>\n                </execution>\n              </executions>\n            </plugin>\n          </plugins>\n        </pluginManagement>\n      </build>\n    </profile>\n  </profiles>\n</project>\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-modular/src/main/java/base/Base.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 base;\n\npublic class Base {\n\n    public static String get() {\n        return \"BASE\";\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-modular/src/main/java/mr/A.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 mr;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> 8\";\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return java.time.LocalDateTime.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-modular/src/main/java/mr/I.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 mr;\n\npublic interface I {\n    Class<?> introducedClass();\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-modular/src/main/java17/mr/A.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 mr;\n\nimport java.util.Optional;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> \" + Optional.of(\"17\").get();\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return Module.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-modular/src/main/java9/module-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 */\nmodule example.mrjar {\n    exports base;\n    exports mr;\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-modular/src/main/java9/mr/A.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 mr;\n\nimport java.util.Optional;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> \" + Optional.of(\"9\").get();\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return Module.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-modular/src/test/java/mr/ATest.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 mr;\n\nimport org.junit.Test;\n\nimport static org.hamcrest.CoreMatchers.is;\nimport static org.junit.Assert.assertThat;\nimport static org.junit.Assume.assumeThat;\n\npublic class ATest {\n\n    private static final String javaVersion = System.getProperty(\"java.version\");\n\n    @Test\n    public void testGet8() throws Exception {\n        assumeThat(javaVersion, is(\"8\"));\n\n        assertThat(A.getString(), is(\"BASE -> 8\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.time.LocalDateTime\"));\n    }\n\n    @Test\n    public void testGet9() throws Exception {\n        assumeThat(javaVersion, is(\"9\"));\n\n        assertThat(A.getString(), is(\"BASE -> 9\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.lang.Module\"));\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-modular/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.JarFile\n\ndef baseVersion = 52 // Java 8\ndef mr1Version = 53; // Java 9\ndef mr2Version = 61; // Java 17\n\ndef mrjar = new JarFile(new File(basedir,'target/multirelease-1.0.0-SNAPSHOT.jar'))\n\nassert (je = mrjar.getEntry('base/Base.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('mr/A.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('mr/I.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\n\nassert mrjar.manifest.mainAttributes.getValue('Multi-Release') == 'true'\n\nassert (je = mrjar.getEntry('META-INF/versions/9/mr/A.class')) != null\nassert mr1Version == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('META-INF/versions/9/module-info.class')) != null\nassert mr1Version == getMajor(mrjar.getInputStream(je))\n\nassert (je = mrjar.getEntry('META-INF/versions/17/mr/A.class')) != null\nassert mr2Version == getMajor(mrjar.getInputStream(je))\n\n/*\n  base\n  base/Base.class\n  mr\n  mr/A.class\n  mr/I.class\n  META-INF\n  META-INF/MANFEST.MF\n  META-INF/versions\n  META-INF/versions/9\n  META-INF/versions/9/mr\n  META-INF/versions/9/mr/A.class\n  META-INF/versions/9/module-info.class\n  META-INF/versions/17\n  META-INF/versions/17/mr\n  META-INF/versions/17/mr/A.class\n  META-INF/maven\n  META-INF/maven/multirelease\n  META-INF/maven/multirelease/multirelease\n  META-INF/maven/multirelease/multirelease/pom.xml\n  META-INF/maven/multirelease/multirelease/pom.properties\n*/\nassert mrjar.entries().size() == 20\n\nint getMajor(InputStream is)\n{\n  def dis = new DataInputStream(is)\n  final String firstFourBytes = Integer.toHexString(dis.readUnsignedShort()) + Integer.toHexString(dis.readUnsignedShort())\n  if (!firstFourBytes.equalsIgnoreCase(\"cafebabe\"))\n  {\n    throw new IllegalArgumentException(dataSourceName + \" is NOT a Java .class file.\")\n  }\n  final int minorVersion = dis.readUnsignedShort()\n  final int majorVersion = dis.readUnsignedShort()\n\n  is.close();\n  return majorVersion;\n}\n\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-root/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.\ninvoker.goals = verify\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-root/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>multirelease</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <name>Single Project :: Root</name>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</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-failsafe-plugin</artifactId>\n          <version>@version.maven-surefire@</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          <configuration>\n            <!-- this shows that the Java 9 code isn't tested -->\n            <testFailureIgnore>true</testFailureIgnore>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <release>9</release>\n        </configuration>\n        <executions>\n          <execution>\n            <id>multi-release-11</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>11</release>\n              <compileSourceRoots>\n                <compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot>\n              </compileSourceRoots>\n              <multiReleaseOutput>true</multiReleaseOutput>\n            </configuration>\n          </execution>\n          <execution>\n            <id>multi-release-17</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>17</release>\n              <compileSourceRoots>\n                <compileSourceRoot>${project.basedir}/src/main/java17</compileSourceRoot>\n              </compileSourceRoots>\n              <multiReleaseOutput>true</multiReleaseOutput>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <!-- Rerun unittests with the multirelease jar, cannot be done with exploded directory of classes  -->\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-failsafe-plugin</artifactId>\n        <configuration>\n          <includes>\n            <include>**/*Test.java</include>\n          </includes>\n        </configuration>\n        <executions>\n          <execution>\n            <goals>\n              <goal>integration-test</goal>\n              <goal>verify</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <executions>\n          <execution>\n            <id>default-jar</id>\n            <configuration>\n              <archive>\n                <manifestEntries>\n                  <Multi-Release>true</Multi-Release>\n                </manifestEntries>\n              </archive>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-root/src/main/java/base/Base.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 base;\n\npublic class Base {\n\n    public static String get() {\n        return \"BASE\";\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-root/src/main/java/module-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 */\nmodule example.mrjar {\n    exports base;\n    exports mr;\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-root/src/main/java/mr/A.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 mr;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> 9\";\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return java.time.LocalDateTime.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-root/src/main/java/mr/I.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 mr;\n\npublic interface I {\n    Class<?> introducedClass();\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-root/src/main/java11/mr/A.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 mr;\n\nimport java.util.Optional;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> \" + Optional.of(\"11\").get();\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return Module.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-root/src/main/java17/mr/A.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 mr;\n\nimport java.util.Optional;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> \" + Optional.of(\"17\").get();\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return Module.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-root/src/test/java/mr/ATest.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 mr;\n\nimport org.junit.Test;\n\nimport static org.hamcrest.CoreMatchers.is;\nimport static org.junit.Assert.assertThat;\nimport static org.junit.Assume.assumeThat;\n\npublic class ATest {\n\n    private static final String javaVersion = System.getProperty(\"java.version\");\n\n    @Test\n    public void testGet9() throws Exception {\n        assumeThat(javaVersion, is(\"9\"));\n\n        assertThat(A.getString(), is(\"BASE -> 9\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.time.LocalDateTime\"));\n    }\n\n    @Test\n    public void testGet11() throws Exception {\n        assumeThat(javaVersion, is(\"11\"));\n\n        assertThat(A.getString(), is(\"BASE -> 11\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.lang.Module\"));\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-root/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.JarFile\n\ndef baseVersion = 53 // Java 9\ndef mr1Version = 55; // Java 11\ndef mr2Version = 61; // Java 17\n\ndef mrjar = new JarFile(new File(basedir,'target/multirelease-1.0.0-SNAPSHOT.jar'))\n\nassert (je = mrjar.getEntry('base/Base.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('mr/A.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('mr/I.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('module-info.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\n\nassert mrjar.manifest.mainAttributes.getValue('Multi-Release') == 'true'\n\nassert (je = mrjar.getEntry('META-INF/versions/11/mr/A.class')) != null\nassert mr1Version == getMajor(mrjar.getInputStream(je))\n\nassert (je = mrjar.getEntry('META-INF/versions/17/mr/A.class')) != null\nassert mr2Version == getMajor(mrjar.getInputStream(je))\n\n/*\n  base\n  base/Base.class\n  module-info.class\n  mr\n  mr/A.class\n  mr/I.class\n  META-INF\n  META-INF/MANFEST.MF\n  META-INF/versions\n  META-INF/versions/11\n  META-INF/versions/11/mr\n  META-INF/versions/11/mr/A.class\n  META-INF/versions/17\n  META-INF/versions/17/mr\n  META-INF/versions/17/mr/A.class\n  META-INF/maven\n  META-INF/maven/multirelease\n  META-INF/maven/multirelease/multirelease\n  META-INF/maven/multirelease/multirelease/pom.xml\n  META-INF/maven/multirelease/multirelease/pom.properties\n*/\nassert mrjar.entries().size() == 20\n\nint getMajor(InputStream is)\n{\n  def dis = new DataInputStream(is)\n  final String firstFourBytes = Integer.toHexString(dis.readUnsignedShort()) + Integer.toHexString(dis.readUnsignedShort())\n  if (!firstFourBytes.equalsIgnoreCase(\"cafebabe\"))\n  {\n    throw new IllegalArgumentException(dataSourceName + \" is NOT a Java .class file.\")\n  }\n  final int minorVersion = dis.readUnsignedShort()\n  final int majorVersion = dis.readUnsignedShort()\n\n  is.close();\n  return majorVersion;\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-runtime/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.\ninvoker.goals = verify\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-runtime/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>multirelease</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <name>Single Project :: Runtime</name>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</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-failsafe-plugin</artifactId>\n          <version>@version.maven-surefire@</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          <configuration>\n            <!-- this shows that the Java 9 code isn't tested -->\n            <testFailureIgnore>true</testFailureIgnore>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <release>16</release>\n        </configuration>\n        <executions>\n          <execution>\n            <id>jdk9</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>17</release>\n              <compileSourceRoots>\n                <compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>\n              </compileSourceRoots>\n              <multiReleaseOutput>true</multiReleaseOutput>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <!-- Rerun unittests with the multirelease jar, cannot be done with exploded directory of classes  -->\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-failsafe-plugin</artifactId>\n        <configuration>\n          <includes>\n            <include>**/*Test.java</include>\n          </includes>\n        </configuration>\n        <executions>\n          <execution>\n            <goals>\n              <goal>integration-test</goal>\n              <goal>verify</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n  <profiles>\n    <profile>\n      <id>jdk9</id>\n      <activation>\n        <jdk>[9,)</jdk>\n      </activation>\n      <build>\n        <pluginManagement>\n          <plugins>\n            <plugin>\n              <groupId>org.apache.maven.plugins</groupId>\n              <artifactId>maven-jar-plugin</artifactId>\n              <executions>\n                <execution>\n                  <id>default-jar</id>\n                  <configuration>\n                    <archive>\n                      <manifestEntries>\n                        <Multi-Release>true</Multi-Release>\n                      </manifestEntries>\n                    </archive>\n                  </configuration>\n                </execution>\n              </executions>\n            </plugin>\n          </plugins>\n        </pluginManagement>\n      </build>\n    </profile>\n  </profiles>\n</project>\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-runtime/src/main/java/base/Base.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 base;\n\npublic class Base {\n\n    public static String get() {\n        return \"BASE\";\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-runtime/src/main/java/mr/A.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 mr;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> 8\";\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return java.time.LocalDateTime.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-runtime/src/main/java/mr/I.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 mr;\n\npublic interface I {\n    Class<?> introducedClass();\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-runtime/src/main/java9/module-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 */\nmodule example.mrjar {\n    exports base;\n    exports mr;\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-runtime/src/main/java9/mr/A.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 mr;\n\nimport java.util.Optional;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> \" + Optional.of(\"9\").get();\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return Module.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-runtime/src/test/java/mr/ATest.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 mr;\n\nimport org.junit.Test;\n\nimport static org.hamcrest.CoreMatchers.is;\nimport static org.junit.Assert.assertThat;\nimport static org.junit.Assume.assumeThat;\n\npublic class ATest {\n\n    private static final String javaVersion = System.getProperty(\"java.version\");\n\n    @Test\n    public void testGet8() throws Exception {\n        assumeThat(javaVersion, is(\"8\"));\n\n        assertThat(A.getString(), is(\"BASE -> 8\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.time.LocalDateTime\"));\n    }\n\n    @Test\n    public void testGet9() throws Exception {\n        assumeThat(javaVersion, is(\"9\"));\n\n        assertThat(A.getString(), is(\"BASE -> 9\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.lang.Module\"));\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-runtime/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.JarFile\n\ndef baseVersion = 60 // Java 16\ndef nextVersion = 61; // Java 17\n\ndef mrjar = new JarFile(new File(basedir,'target/multirelease-1.0.0-SNAPSHOT.jar'))\n\nassert (je = mrjar.getEntry('base/Base.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('mr/A.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('mr/I.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\n\nassert mrjar.manifest.mainAttributes.getValue('Multi-Release') == 'true'\n\nassert (je = mrjar.getEntry('META-INF/versions/17/mr/A.class')) != null\nassert nextVersion == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('META-INF/versions/17/module-info.class')) != null\nassert nextVersion == getMajor(mrjar.getInputStream(je))\n\n/*\n  base\n  base/Base.class\n  mr\n  mr/A.class\n  mr/I.class\n  META-INF\n  META-INF/MANFEST.MF\n  META-INF/versions\n  META-INF/versions/9\n  META-INF/versions/9/mr\n  META-INF/versions/9/mr/A.class\n  META-INF/versions/9/module-info.class\n  META-INF/maven\n  META-INF/maven/multirelease\n  META-INF/maven/multirelease/multirelease\n  META-INF/maven/multirelease/multirelease/pom.xml\n  META-INF/maven/multirelease/multirelease/pom.properties\n*/\nassert mrjar.entries().size() == 17\n\nint getMajor(InputStream is)\n{\n  def dis = new DataInputStream(is)\n  final String firstFourBytes = Integer.toHexString(dis.readUnsignedShort()) + Integer.toHexString(dis.readUnsignedShort())\n  if (!firstFourBytes.equalsIgnoreCase(\"cafebabe\"))\n  {\n    throw new IllegalArgumentException(dataSourceName + \" is NOT a Java .class file.\")\n  }\n  final int minorVersion = dis.readUnsignedShort()\n  final int majorVersion = dis.readUnsignedShort()\n\n  is.close();\n  return majorVersion;\n}\n\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-separate-moduleinfo/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.\ninvoker.goals = verify\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-separate-moduleinfo/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>multirelease</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <name>Single Project :: Separate Module Info</name>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</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-failsafe-plugin</artifactId>\n          <version>@version.maven-surefire@</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          <configuration>\n            <!-- this shows that the Java 9 code isn't tested -->\n            <testFailureIgnore>true</testFailureIgnore>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <executions>\n          <execution>\n            <id>default-compile</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>8</release>\n              <excludes>\n                <exclude>module-info.java</exclude>\n              </excludes>\n            </configuration>\n          </execution>\n          <execution>\n            <id>module-info</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>9</release>\n              <includes>\n                <include>module-info.java</include>\n              </includes>\n            </configuration>\n          </execution>\n          <execution>\n            <id>multi-release-9</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>9</release>\n              <compileSourceRoots>\n                <compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>\n              </compileSourceRoots>\n              <multiReleaseOutput>true</multiReleaseOutput>\n            </configuration>\n          </execution>\n          <execution>\n            <id>multi-release-17</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>17</release>\n              <compileSourceRoots>\n                <compileSourceRoot>${project.basedir}/src/main/java17</compileSourceRoot>\n              </compileSourceRoots>\n              <multiReleaseOutput>true</multiReleaseOutput>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      <!-- Rerun unittests with the multirelease jar, cannot be done with exploded directory of classes  -->\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-failsafe-plugin</artifactId>\n        <configuration>\n          <includes>\n            <include>**/*Test.java</include>\n          </includes>\n        </configuration>\n        <executions>\n          <execution>\n            <goals>\n              <goal>integration-test</goal>\n              <goal>verify</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-jar-plugin</artifactId>\n        <executions>\n          <execution>\n            <id>default-jar</id>\n            <configuration>\n              <archive>\n                <manifestEntries>\n                  <Multi-Release>true</Multi-Release>\n                </manifestEntries>\n              </archive>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-separate-moduleinfo/src/main/java/base/Base.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 base;\n\npublic class Base {\n\n    public static String get() {\n        return \"BASE\";\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-separate-moduleinfo/src/main/java/module-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 */\nmodule example.mrjar {\n    exports base;\n    exports mr;\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-separate-moduleinfo/src/main/java/mr/A.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 mr;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> 8\";\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return java.time.LocalDateTime.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-separate-moduleinfo/src/main/java/mr/I.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 mr;\n\npublic interface I {\n    Class<?> introducedClass();\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-separate-moduleinfo/src/main/java17/mr/A.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 mr;\n\nimport java.util.Optional;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> \" + Optional.of(\"17\").get() + B.getString();\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return Module.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-separate-moduleinfo/src/main/java9/mr/A.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 mr;\n\nimport java.util.Optional;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> \" + Optional.of(\"9\").get();\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return Module.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-separate-moduleinfo/src/main/java9/mr/B.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 mr;\n\npublic class B {\n    public static String getString() {\n        return \"B\";\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-separate-moduleinfo/src/test/java/mr/ATest.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 mr;\n\nimport org.junit.Test;\n\nimport static org.hamcrest.CoreMatchers.is;\nimport static org.junit.Assert.assertThat;\nimport static org.junit.Assume.assumeThat;\n\npublic class ATest {\n\n    private static final String javaVersion = System.getProperty(\"java.version\");\n\n    @Test\n    public void testGet8() throws Exception {\n        assumeThat(javaVersion, is(\"8\"));\n\n        assertThat(A.getString(), is(\"BASE -> 8\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.time.LocalDateTime\"));\n    }\n\n    @Test\n    public void testGet9() throws Exception {\n        assumeThat(javaVersion, is(\"9\"));\n\n        assertThat(A.getString(), is(\"BASE -> 9B\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.lang.Module\"));\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-separate-moduleinfo/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.JarFile\n\ndef baseVersion = 52 // Java 8\ndef mr1Version = 53; // Java 9\ndef mr2Version = 61; // Java 17\n\ndef mrjar = new JarFile(new File(basedir,'target/multirelease-1.0.0-SNAPSHOT.jar'))\n\nassert (je = mrjar.getEntry('base/Base.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('mr/A.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('mr/I.class')) != null\nassert baseVersion == getMajor(mrjar.getInputStream(je))\n\nassert (je = mrjar.getEntry('module-info.class')) != null\nassert mr1Version == getMajor(mrjar.getInputStream(je))\n\nassert mrjar.manifest.mainAttributes.getValue('Multi-Release') == 'true'\n\nassert (je = mrjar.getEntry('META-INF/versions/9/mr/A.class')) != null\nassert mr1Version == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('META-INF/versions/9/mr/B.class')) != null\nassert mr1Version == getMajor(mrjar.getInputStream(je))\n\nassert (je = mrjar.getEntry('META-INF/versions/17/mr/A.class')) != null\nassert mr2Version == getMajor(mrjar.getInputStream(je))\n\n/*\n  base\n  base/Base.class\n  module-info.class\n  mr\n  mr/A.class\n  mr/I.class\n  META-INF\n  META-INF/MANFEST.MF\n  META-INF/versions\n  META-INF/versions/9\n  META-INF/versions/9/mr\n  META-INF/versions/9/mr/A.class\n  META-INF/versions/9/mr/B.class\n  META-INF/versions/17\n  META-INF/versions/17/mr\n  META-INF/versions/17/mr/A.class\n  META-INF/maven\n  META-INF/maven/multirelease\n  META-INF/maven/multirelease/multirelease\n  META-INF/maven/multirelease/multirelease/pom.xml\n  META-INF/maven/multirelease/multirelease/pom.properties\n*/\nassert mrjar.entries().size() == 21\n\nint getMajor(InputStream is)\n{\n  def dis = new DataInputStream(is)\n  final String firstFourBytes = Integer.toHexString(dis.readUnsignedShort()) + Integer.toHexString(dis.readUnsignedShort())\n  if (!firstFourBytes.equalsIgnoreCase(\"cafebabe\"))\n  {\n    throw new IllegalArgumentException(dataSourceName + \" is NOT a Java .class file.\")\n  }\n  final int minorVersion = dis.readUnsignedShort()\n  final int majorVersion = dis.readUnsignedShort()\n\n  is.close();\n  return majorVersion;\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-toolchains/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.\ninvoker.goals = verify -Pmulti-jar\ninvoker.toolchain.jdk.version=1.9\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-toolchains/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>multirelease</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n\n  <name>Single Project :: Toolchains</name>\n\n  <properties>\n    <!-- The oldest Java version supported by this tool. -->\n    <!-- Will control compilation of the main code and the unit tests. -->\n    <base.java.version>1.8</base.java.version>\n\n    <!-- set the property when running from the release plugin -->\n    <arguments>-Dmulti_release=true</arguments>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>junit</groupId>\n      <artifactId>junit</artifactId>\n      <version>4.13.1</version>\n      <scope>test</scope>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n\n      <!-- Use toolchains to select the compilers -->\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-toolchains-plugin</artifactId>\n        <version>3.1.0</version>\n        <configuration>\n          <toolchains>\n            <jdk>\n              <version>${base.java.version}</version>\n            </jdk>\n          </toolchains>\n        </configuration>\n        <executions>\n          <execution>\n            <goals>\n              <goal>toolchain</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n\n      <!-- define the possible compilations -->\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <release>${base.java.version}</release>\n        </configuration>\n        <executions>\n          <!-- for Java 9 -->\n          <execution>\n            <id>java9</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <phase />\n            <configuration>\n              <release>17</release>\n              <jdkToolchain>\n                <version>17</version>\n              </jdkToolchain>\n              <compileSourceRoots>\n                <compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>\n              </compileSourceRoots>\n              <multiReleaseOutput>true</multiReleaseOutput>\n            </configuration>\n          </execution>\n          <!-- for Java 10 -->\n          <execution>\n            <id>java10</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <phase />\n            <configuration>\n              <release>10</release>\n              <jdkToolchain>\n                <version>10</version>\n              </jdkToolchain>\n              <compileSourceRoots>\n                <compileSourceRoot>${project.basedir}/src/main/java10</compileSourceRoot>\n              </compileSourceRoots>\n              <multiReleaseOutput>true</multiReleaseOutput>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n\n      <!-- Rerun unittests with the multirelease jar, cannot be done with exploded directory of classes  -->\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-failsafe-plugin</artifactId>\n        <version>@version.maven-surefire@</version>\n        <configuration>\n          <includes>\n            <include>**/*Test.java</include>\n          </includes>\n        </configuration>\n        <executions>\n          <execution>\n            <goals>\n              <goal>integration-test</goal>\n              <goal>verify</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n\n  <profiles>\n\n    <!-- enable java9 compilation -->\n    <profile>\n      <id>compile-java9</id>\n      <activation>\n        <jdk>[9,)</jdk>\n      </activation>\n      <build>\n        <plugins>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-compiler-plugin</artifactId>\n            <executions>\n              <execution>\n                <id>java9</id>\n                <phase>compile</phase>\n              </execution>\n            </executions>\n          </plugin>\n        </plugins>\n      </build>\n    </profile>\n\n    <!-- enable java10 compilation -->\n    <profile>\n      <id>compile-java10</id>\n      <activation>\n        <jdk>[10,)</jdk>\n      </activation>\n      <build>\n        <plugins>\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-compiler-plugin</artifactId>\n            <executions>\n              <execution>\n                <id>java10</id>\n                <phase>compile</phase>\n              </execution>\n            </executions>\n          </plugin>\n        </plugins>\n      </build>\n    </profile>\n\n    <profile>\n      <id>test-toolchains-bypass</id>\n      <activation>\n        <property>\n          <name>!multi_release</name>\n        </property>\n      </activation>\n\n      <build>\n        <plugins>\n          <!-- Run the unit tests with the JVM used to run maven -->\n          <plugin>\n            <artifactId>maven-surefire-plugin</artifactId>\n            <version>@version.maven-surefire@</version>\n            <configuration>\n              <jvm>${env.JAVA_HOME}/bin/java</jvm>\n              <!-- this shows that the Java 9 code isn't tested -->\n              <testFailureIgnore>true</testFailureIgnore>\n            </configuration>\n          </plugin>\n        </plugins>\n      </build>\n    </profile>\n\n    <profile>\n      <id>multi-jar</id>\n      <activation>\n        <property>\n          <name>multi_release</name>\n        </property>\n      </activation>\n\n      <build>\n        <plugins>\n          <!-- enable java9 - java11 compilations -->\n          <plugin>\n            <groupId>org.apache.maven.plugins</groupId>\n            <artifactId>maven-compiler-plugin</artifactId>\n            <executions>\n              <execution>\n                <id>java9</id>\n                <phase>compile</phase>\n              </execution>\n              <execution>\n                <id>java10</id>\n                <phase>compile</phase>\n              </execution>\n              <execution>\n                <id>java11</id>\n                <phase>compile</phase>\n              </execution>\n            </executions>\n          </plugin>\n\n          <!-- add the multi-release:true manifest entry -->\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                <manifestEntries>\n                  <Multi-Release>true</Multi-Release>\n                </manifestEntries>\n              </archive>\n              <excludes>\n                <exclude>**/javac*</exclude>\n                <exclude>**/org.codehaus.plexus.compiler.javac.JavacCompiler*arguments</exclude>\n              </excludes>\n            </configuration>\n          </plugin>\n        </plugins>\n      </build>\n    </profile>\n  </profiles>\n</project>\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-toolchains/src/main/java/base/Base.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 base;\n\npublic class Base {\n\n    public static String get() {\n        return \"BASE\";\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-toolchains/src/main/java/mr/A.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 mr;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> 8\";\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return java.time.LocalDateTime.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-toolchains/src/main/java/mr/I.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 mr;\n\npublic interface I {\n    Class<?> introducedClass();\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-toolchains/src/main/java9/module-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 */\nmodule example.mrjar {\n    exports base;\n    exports mr;\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-toolchains/src/main/java9/mr/A.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 mr;\n\nimport java.util.Optional;\n\nimport base.Base;\n\npublic class A implements I {\n    public static String getString() {\n        return Base.get() + \" -> \" + Optional.of(\"9\").get();\n    }\n\n    @Override\n    public Class<?> introducedClass() {\n        return Module.class;\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-toolchains/src/test/java/mr/ATest.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 mr;\n\nimport org.junit.Test;\n\nimport static org.hamcrest.CoreMatchers.is;\nimport static org.junit.Assert.assertThat;\nimport static org.junit.Assume.assumeThat;\n\npublic class ATest {\n\n    private static final String javaVersion = System.getProperty(\"java.version\");\n\n    @Test\n    public void testGet8() throws Exception {\n        assumeThat(javaVersion, is(\"8\"));\n\n        assertThat(A.getString(), is(\"BASE -> 8\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.time.LocalDateTime\"));\n    }\n\n    @Test\n    public void testGet9() throws Exception {\n        assumeThat(javaVersion, is(\"9\"));\n\n        assertThat(A.getString(), is(\"BASE -> 9\"));\n\n        assertThat(new A().introducedClass().getName(), is(\"java.lang.Module\"));\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-patterns/singleproject-toolchains/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.JarFile\n\ndef mrjar = new JarFile(new File(basedir,'target/multirelease-1.0.0-SNAPSHOT.jar'))\n\nassert mrjar.manifest.mainAttributes.getValue('Multi-Release') == 'true'\n\nassert (je = mrjar.getEntry('base/Base.class')) != null\nassert 52 == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('mr/A.class')) != null\nassert 52 == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('mr/I.class')) != null\nassert 52 == getMajor(mrjar.getInputStream(je))\n\nassert (je = mrjar.getEntry('META-INF/versions/9/mr/A.class')) != null\nassert 53 == getMajor(mrjar.getInputStream(je))\nassert (je = mrjar.getEntry('META-INF/versions/9/module-info.class')) != null\nassert 53 == getMajor(mrjar.getInputStream(je))\n\n/*\n  base\n  base/Base.class\n  mr\n  mr/A.class\n  mr/I.class\n  META-INF\n  META-INF/MANFEST.MF\n  META-INF/versions\n  META-INF/versions/9\n  META-INF/versions/9/mr\n  META-INF/versions/9/mr/A.class\n  META-INF/versions/9/module-info.class\n  META-INF/maven\n  META-INF/maven/multirelease\n  META-INF/maven/multirelease/multirelease\n  META-INF/maven/multirelease/multirelease/pom.xml\n  META-INF/maven/multirelease/multirelease/pom.properties\n*/\nassert mrjar.size() == 17\n\nint getMajor(InputStream is)\n{\n  def dis = new DataInputStream(is)\n  final String firstFourBytes = Integer.toHexString(dis.readUnsignedShort()) + Integer.toHexString(dis.readUnsignedShort())\n  if (!firstFourBytes.equalsIgnoreCase(\"cafebabe\"))\n  {\n    throw new IllegalArgumentException(dataSourceName + \" is NOT a Java .class file.\")\n  }\n  final int minorVersion = dis.readUnsignedShort()\n  final int majorVersion = dis.readUnsignedShort()\n\n  is.close();\n  return majorVersion;\n}\n"
  },
  {
    "path": "src/it/multirelease-with-modules/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.1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.1.0 http://maven.apache.org/xsd/maven-4.1.0.xsd\">\n  <modelVersion>4.1.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>multirelease-with-modules</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>jar</packaging>\n  <name>Multirelease with modules</name>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n\n    <sources>\n      <source>\n        <module>foo.bar</module>\n        <directory>src/foo.bar/main/java</directory>\n        <targetVersion>15</targetVersion>\n      </source>\n      <source>\n        <module>foo.bar</module>\n        <directory>src/foo.bar/main/java_16</directory>\n        <targetVersion>16</targetVersion>\n      </source>\n      <source>\n        <module>foo.bar.more</module>\n        <directory>src/foo.bar.more/main/java</directory>\n        <targetVersion>15</targetVersion>\n      </source>\n      <source>\n        <module>foo.bar.more</module>\n        <directory>src/foo.bar.more/main/java_16</directory>\n        <targetVersion>16</targetVersion>\n      </source>\n    </sources>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/multirelease-with-modules/src/foo.bar/main/java/foo/MainFile.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 foo;\n\n/**\n * Test {@code &lt;Source&gt;}.\n * Another {@code &lt;Source&gt;}.\n */\npublic class MainFile {\n    public static void main(String[] args) {\n        System.out.println(\"MainFile\");\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-with-modules/src/foo.bar/main/java/foo/OtherFile.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 foo;\n\n/**\n * Test {@code &lt;Source&gt;}.\n * Another {@code &lt;Source&gt;}.\n */\npublic class OtherFile {\n    public static void main(String[] args) {\n        System.out.println(\"OtherFile\");\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-with-modules/src/foo.bar/main/java/foo/YetAnotherFile.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 foo;\n\n/**\n * Test {@code &lt;Source&gt;}.\n * Another {@code &lt;Source&gt;}.\n */\npublic class YetAnotherFile {\n    public static void main(String[] args) {\n        System.out.println(\"YetAnotherFile\");\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-with-modules/src/foo.bar/main/java/module-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 */\nmodule foo.bar {}\n"
  },
  {
    "path": "src/it/multirelease-with-modules/src/foo.bar/main/java_16/foo/OtherFile.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 foo;\n\n/**\n * Test {@code &lt;Source&gt;}.\n * Another {@code &lt;Source&gt;}.\n */\npublic class OtherFile {\n    public static void main(String[] args) {\n        System.out.println(\"OtherFile on Java 16\");\n        MainFile.main(args); // Verify that we have access to the base version.\n    }\n\n    static void requireJava16() {\n        System.out.println(\"Method available only on Java 16+\");\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-with-modules/src/foo.bar.more/main/java/module-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 */\nmodule foo.bar.more {}\n"
  },
  {
    "path": "src/it/multirelease-with-modules/src/foo.bar.more/main/java/more/MainFile.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 more;\n\n/**\n * Test {@code &lt;Source&gt;}.\n * Another {@code &lt;Source&gt;}.\n */\npublic class MainFile {\n    public static void main(String[] args) {\n        System.out.println(\"MainFile of more\");\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-with-modules/src/foo.bar.more/main/java/more/OtherFile.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 more;\n\n/**\n * Test {@code &lt;Source&gt;}.\n * Another {@code &lt;Source&gt;}.\n */\npublic class OtherFile {\n    public static void main(String[] args) {\n        System.out.println(\"OtherFile of more\");\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-with-modules/src/foo.bar.more/main/java_16/more/OtherFile.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 more;\n\n/**\n * Test {@code &lt;Source&gt;}.\n * Another {@code &lt;Source&gt;}.\n */\npublic class OtherFile {\n    public static void main(String[] args) {\n        System.out.println(\"OtherFile of more on Java 16\");\n        MainFile.main(args); // Verify that we have access to the base version.\n    }\n}\n"
  },
  {
    "path": "src/it/multirelease-with-modules/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.JarFile\n\ndef baseVersion = 59; // Java 15\ndef nextVersion = 60; // Java 16\n\nassert baseVersion == getMajor(new File( basedir, \"target/classes/foo.bar/foo/MainFile.class\"))\nassert baseVersion == getMajor(new File( basedir, \"target/classes/foo.bar/foo/OtherFile.class\"))\nassert baseVersion == getMajor(new File( basedir, \"target/classes/foo.bar/foo/YetAnotherFile.class\"))\nassert baseVersion == getMajor(new File( basedir, \"target/classes/foo.bar.more/more/MainFile.class\"))\nassert baseVersion == getMajor(new File( basedir, \"target/classes/foo.bar.more/more/OtherFile.class\"))\nassert nextVersion == getMajor(new File( basedir, \"target/classes/META-INF/versions-modular/16/foo.bar/foo/OtherFile.class\"))\nassert nextVersion == getMajor(new File( basedir, \"target/classes/META-INF/versions-modular/16/foo.bar.more/more/OtherFile.class\"))\n\n// Verify that the classes inherited from the base version were not recompiled a second time.\nassert new File( basedir, \"target/classes/META-INF/versions-modular/16/foo.bar/foo/MainFile.class\").exists() == false\nassert new File( basedir, \"target/classes/META-INF/versions-modular/16/foo.bar/foo/YetAnotherFile.class\").exists() == false\nassert new File( basedir, \"target/classes/META-INF/versions-modular/16/foo.bar.more/more/MainFile.class\").exists() == false\n\n\nint getMajor(File file)\n{\n  assert file.exists()\n  def dis = new DataInputStream(new FileInputStream(file))\n  final String firstFourBytes = Integer.toHexString(dis.readUnsignedShort()) + Integer.toHexString(dis.readUnsignedShort())\n  if (!firstFourBytes.equalsIgnoreCase(\"cafebabe\"))\n  {\n    throw new IllegalArgumentException(dataSourceName + \" is not a Java .class file.\")\n  }\n  final int minorVersion = dis.readUnsignedShort()\n  final int majorVersion = dis.readUnsignedShort()\n\n  dis.close()\n  return majorVersion\n}\n"
  },
  {
    "path": "src/it/non-english-warnings/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: javac has been localized for Japanese, i.e. javac won't output English messages in this locale...\ninvoker.mavenOpts = -Duser.language=ja\n"
  },
  {
    "path": "src/it/non-english-warnings/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>non-english-warnings</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <name>MCOMPILER-109</name>\n  <description>Test that warnings in locales other than English are not erroneously classified as errors and fail the build.\n    The particular locales of interest here are Japanese (ja) and Simplified Chinese (zh_CN) for which javac actually\n    is localized.</description>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n        <configuration>\n          <fork>false</fork>\n          <showWarnings>true</showWarnings>\n          <showDeprecation>true</showDeprecation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/non-english-warnings/src/main/java/MyClass.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 foo;\n\npublic class MyClass {\n\n    public static void main(String[] args) {\n        // the date constructor is deprecated and will cause a warning\n        System.out.println(new java.util.Date(2010, 8, 29));\n    }\n}\n"
  },
  {
    "path": "src/it/non-english-warnings/src/test/java/MyTest.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 foo;\n\npublic class MyTest {\n\n    public static void main(String[] args) {\n        // the date constructor is deprecated and will cause a warning\n        System.out.println(new java.util.Date(2010, 8, 29));\n    }\n}\n"
  },
  {
    "path": "src/it/non-english-warnings/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 */\npackage foo;\n\nimport java.io.*;\nimport java.util.*;\nimport java.util.regex.*;\n\nFile mainClass = new File( basedir, \"target/classes/foo/MyClass.class\" );\nif ( !mainClass.isFile() )\n{\n    throw new FileNotFoundException( \"Main class not existent: \" + mainClass );\n}\n\nFile testClass = new File( basedir, \"target/test-classes/foo/MyTest.class\" );\nif ( !testClass.isFile() )\n{\n    throw new FileNotFoundException( \"Test class not existent: \" + testClass );\n}\n"
  },
  {
    "path": "src/it/processor-type/annotation-processor/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.1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.1.0 http://maven.apache.org/xsd/maven-4.1.0.xsd\">\n  <modelVersion>4.1.0</modelVersion>\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>processor-type</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>annotation-processor</artifactId>\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>annotation-processor-dep</artifactId>\n      <version>1.0-SNAPSHOT</version>\n    </dependency>\n  </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/processor-type/annotation-processor/src/main/java/processor/SimpleAnnotationProcessor.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 processor;\n\nimport javax.annotation.processing.AbstractProcessor;\nimport javax.annotation.processing.RoundEnvironment;\nimport javax.annotation.processing.SupportedAnnotationTypes;\nimport javax.annotation.processing.SupportedSourceVersion;\nimport javax.lang.model.SourceVersion;\nimport javax.lang.model.element.Element;\nimport javax.lang.model.element.Name;\nimport javax.lang.model.element.TypeElement;\nimport javax.tools.FileObject;\nimport javax.tools.StandardLocation;\n\nimport java.io.IOException;\nimport java.io.UncheckedIOException;\nimport java.io.Writer;\nimport java.util.Set;\n\n@SupportedSourceVersion(SourceVersion.RELEASE_17)\n@SupportedAnnotationTypes(\"user.SimpleAnnotation\")\npublic class SimpleAnnotationProcessor extends AbstractProcessor {\n    public SimpleAnnotationProcessor() {}\n\n    @Override\n    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {\n        // Verifies that transitive dependencies worked.\n        // TODO: pending https://github.com/apache/maven/pull/11373\n        // dependency.AnnotationProcessorDependency.foo();\n\n        boolean claimed = false;\n        for (TypeElement annotation : annotations) {\n            for (Element element : roundEnv.getElementsAnnotatedWith(annotation)) {\n                Name packageName =\n                        processingEnv.getElementUtils().getPackageOf(element).getQualifiedName();\n                Name name = element.getSimpleName();\n                try {\n                    FileObject resource = processingEnv\n                            .getFiler()\n                            .createResource(StandardLocation.SOURCE_OUTPUT, packageName, name + \".txt\", element);\n                    try (Writer writer = resource.openWriter()) {\n                        writer.write(name.toString());\n                    }\n                } catch (IOException e) {\n                    throw new UncheckedIOException(e);\n                }\n                claimed = true;\n            }\n        }\n        return claimed;\n    }\n}\n"
  },
  {
    "path": "src/it/processor-type/annotation-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor",
    "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\nprocessor.SimpleAnnotationProcessor\n"
  },
  {
    "path": "src/it/processor-type/annotation-processor-dep/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.1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.1.0 http://maven.apache.org/xsd/maven-4.1.0.xsd\">\n  <modelVersion>4.1.0</modelVersion>\n  <parent>\n    <groupId>org.apache.maven.plugins.compiler.it</groupId>\n    <artifactId>processor-type</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n  <artifactId>annotation-processor-dep</artifactId>\n</project>\n"
  },
  {
    "path": "src/it/processor-type/annotation-processor-dep/src/main/java/dependency/AnnotationProcessorDependency.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 dependency;\n\npublic class AnnotationProcessorDependency {\n    public static void foo() {}\n}\n"
  },
  {
    "path": "src/it/processor-type/annotation-user/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.compiler.it</groupId>\n    <artifactId>processor-type</artifactId>\n    <version>1.0-SNAPSHOT</version>\n  </parent>\n\n  <artifactId>annotation-user</artifactId>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>annotation-processor</artifactId>\n      <version>1.0-SNAPSHOT</version>\n      <type>processor</type>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins.compiler.it</groupId>\n        <artifactId>annotation-verify-plugin</artifactId>\n        <version>1.0.0-SNAPSHOT</version>\n        <executions>\n          <execution>\n            <id>verify-annotations</id>\n            <goals>\n              <goal>read-source</goal>\n            </goals>\n            <phase>process-test-classes</phase>\n            <configuration>\n              <sourceClass>user.SimpleObject</sourceClass>\n              <testSourceClass>user.SimpleTestObject</testSourceClass>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/processor-type/annotation-user/src/main/java/user/SimpleAnnotation.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 user;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotation.Target;\n\n@Target(ElementType.TYPE)\n@Retention(RetentionPolicy.SOURCE)\npublic @interface SimpleAnnotation {}\n"
  },
  {
    "path": "src/it/processor-type/annotation-user/src/main/java/user/SimpleObject.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 user;\n\n@SimpleAnnotation\npublic class SimpleObject {}\n"
  },
  {
    "path": "src/it/processor-type/annotation-user/src/test/java/user/SimpleTestObject.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 user;\n\n@SimpleAnnotation\npublic class SimpleTestObject {}\n"
  },
  {
    "path": "src/it/processor-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\ninvoker.goals=process-test-classes\n"
  },
  {
    "path": "src/it/processor-type/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.1.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.1.0 http://maven.apache.org/xsd/maven-4.1.0.xsd\">\n  <modelVersion>4.1.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>processor-type</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>@project.version@</version>\n          <configuration>\n            <release>17</release>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n\n  <subprojects>\n    <subproject>annotation-processor-dep</subproject>\n    <subproject>annotation-processor</subproject>\n    <subproject>annotation-user</subproject>\n  </subprojects>\n</project>\n"
  },
  {
    "path": "src/it/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\n<settings>\n  <profiles>\n    <profile>\n      <id>it-repo</id>\n      <activation>\n        <activeByDefault>true</activeByDefault>\n      </activation>\n      <repositories>\n        <repository>\n          <id>local.central</id>\n          <url>@localRepositoryUrl@</url>\n          <releases>\n            <enabled>true</enabled>\n            <checksumPolicy>ignore</checksumPolicy>\n          </releases>\n          <snapshots>\n            <enabled>true</enabled>\n            <checksumPolicy>ignore</checksumPolicy>\n          </snapshots>\n        </repository>\n      </repositories>\n      <pluginRepositories>\n        <pluginRepository>\n          <id>local.central</id>\n          <url>@localRepositoryUrl@</url>\n          <releases>\n            <enabled>true</enabled>\n            <checksumPolicy>ignore</checksumPolicy>\n          </releases>\n          <snapshots>\n            <enabled>true</enabled>\n            <checksumPolicy>ignore</checksumPolicy>\n          </snapshots>\n        </pluginRepository>\n      </pluginRepositories>\n    </profile>\n  </profiles>\n</settings>\n"
  },
  {
    "path": "src/it/setup_annotation-verify-plugin/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/setup_annotation-verify-plugin/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  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>annotation-verify-plugin</artifactId>\n  <version>1.0.0-SNAPSHOT</version>\n  <packaging>maven-plugin</packaging>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugin-tools</groupId>\n      <artifactId>maven-plugin-annotations</artifactId>\n      <version>@version.maven-plugin-tools-3.x@</version>\n      <scope>provided</scope>\n    </dependency>\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-artifact</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      <exclusions>\n        <exclusion>\n          <groupId>org.apache.maven.reporting</groupId>\n          <artifactId>maven-reporting-api</artifactId>\n        </exclusion>\n        <exclusion>\n          <groupId>org.apache.maven.wagon</groupId>\n          <artifactId>wagon-file</artifactId>\n        </exclusion>\n        <exclusion>\n          <groupId>org.apache.maven.wagon</groupId>\n          <artifactId>wagon-http-lightweight</artifactId>\n        </exclusion>\n        <exclusion>\n          <groupId>org.apache.maven.wagon</groupId>\n          <artifactId>wagon-ssh</artifactId>\n        </exclusion>\n        <exclusion>\n          <groupId>org.apache.maven.wagon</groupId>\n          <artifactId>wagon-ssh-external</artifactId>\n        </exclusion>\n        <exclusion>\n          <groupId>commons-cli</groupId>\n          <artifactId>commons-cli</artifactId>\n        </exclusion>\n        <exclusion>\n          <groupId>classworlds</groupId>\n          <artifactId>classworlds</artifactId>\n        </exclusion>\n        <exclusion>\n          <groupId>org.codehaus.plexus</groupId>\n          <artifactId>plexus-container-default</artifactId>\n        </exclusion>\n        <exclusion>\n          <groupId>org.codehaus.plexus</groupId>\n          <artifactId>plexus-interactivity-api</artifactId>\n        </exclusion>\n      </exclusions>\n    </dependency>\n  </dependencies>\n\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-plugin-plugin</artifactId>\n          <version>@version.maven-plugin-tools-3.x@</version>\n          <configuration>\n            <goalPrefix>annotation-verify</goalPrefix>\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n</project>\n"
  },
  {
    "path": "src/it/setup_annotation-verify-plugin/src/main/java/org.apache.maven.plugins.compiler.it/SourcePathReadGoal.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.compiler.it;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.util.List;\n\nimport org.apache.maven.plugin.AbstractMojo;\nimport org.apache.maven.plugin.MojoExecutionException;\nimport org.apache.maven.plugin.MojoFailureException;\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.project.MavenProject;\n\n@Mojo(name = \"read-source\", defaultPhase = LifecyclePhase.PROCESS_TEST_CLASSES)\npublic class SourcePathReadGoal extends AbstractMojo {\n\n    @Parameter\n    protected String sourceClass;\n\n    @Parameter\n    protected String testSourceClass;\n\n    @Parameter(defaultValue = \"${project}\")\n    protected MavenProject project;\n\n    @SuppressWarnings(\"unchecked\")\n    public void execute() throws MojoExecutionException, MojoFailureException {\n        if (sourceClass != null) {\n            getLog().info(\"Checking compile source roots for: '\" + sourceClass + \"'\");\n            assertGeneratedSourceFileFor(sourceClass, project.getCompileSourceRoots());\n        }\n\n        if (testSourceClass != null) {\n            getLog().info(\"Checking test-compile source roots for: '\" + testSourceClass + \"'\");\n            assertGeneratedSourceFileFor(testSourceClass, project.getTestCompileSourceRoots());\n        }\n    }\n\n    private void assertGeneratedSourceFileFor(String sourceClass, List<String> sourceRoots)\n            throws MojoFailureException, MojoExecutionException {\n        String sourceFile = sourceClass.replace('.', '/').concat(\".txt\");\n\n        boolean found = false;\n        for (String root : sourceRoots) {\n            File f = new File(root, sourceFile);\n            getLog().info(\"Looking for: \" + f);\n            if (f.exists()) {\n                try {\n                    String[] nameParts = sourceClass.split(\"\\\\.\");\n                    String content = new String(Files.readAllBytes(f.toPath()));\n                    if (!nameParts[nameParts.length - 1].equals(content)) {\n                        throw new MojoFailureException(\"Non-matching content in: \" + f + \"\\n  expected: '\" + sourceClass\n                                + \"'\\n  found: '\" + content + \"'\");\n                    }\n                    found = true;\n                    break;\n                } catch (IOException e) {\n                    throw new MojoExecutionException(\"Cannot read contents of: \" + f, e);\n                }\n            }\n        }\n\n        if (!found) {\n            throw new MojoFailureException(\n                    \"Cannot find generated source file: \" + sourceFile + \" in:\\n  \" + String.join(\"\\n  \", sourceRoots));\n        }\n    }\n}\n"
  },
  {
    "path": "src/it/setup_jar_automodule/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/setup_jar_automodule/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>ta3</artifactId>\n  <version>3.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</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            <manifestEntries>\n              <Automatic-Module-Name>com.ta3</Automatic-Module-Name>\n            </manifestEntries>\n          </archive>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/setup_jar_automodule/src/main/java/com/ta3/MyClass.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 com.ta3;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/setup_jar_module/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/setup_jar_module/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>ta2</artifactId>\n  <version>2.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/setup_jar_module/src/main/java/com/ta2/MyClass.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 com.ta2;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/setup_jar_module/src/main/java/module-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\nmodule ta2 {\n    exports com.ta2;\n}\n"
  },
  {
    "path": "src/it/setup_x/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/setup_x/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it.setup</groupId>\n  <artifactId>setup</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <packaging>pom</packaging>\n\n  <modules>\n    <module>setup_jar_classic</module>\n    <module>setup_module-transitive</module>\n  </modules>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n</project>\n"
  },
  {
    "path": "src/it/setup_x/setup_jar_classic/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>ta2</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>@project.version@</version>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/setup_x/setup_jar_classic/src/main/java/com/ta2/MyClass.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 com.ta2;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/setup_x/setup_module-transitive/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>ta2-plus</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.apache.maven.plugins.compiler.it</groupId>\n      <artifactId>ta2</artifactId>\n      <version>1.0-SNAPSHOT</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>@project.version@</version>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/setup_x/setup_module-transitive/src/main/java/com/ta2/plus/MyClass.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 com.ta2.plus;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/it/setup_x/setup_module-transitive/src/main/java/module-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\nmodule ta2.plus {\n    exports com.ta2.plus;\n}\n"
  },
  {
    "path": "src/it/test1/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/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>org.apache.maven.plugins.compiler.it</groupId>\n  <artifactId>test1</artifactId>\n  <version>1.0-SNAPSHOT</version>\n  <name>Test for fork configuration</name>\n  <description>Test for forking compiler configuration</description>\n\n  <properties>\n    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n  </properties>\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>@project.version@</version>\n        <configuration>\n          <fork>true</fork>\n          <debuglevel>source,lines,vars</debuglevel>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n\n</project>\n"
  },
  {
    "path": "src/it/test1/src/main/java/MyClass.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 foo;\n\npublic class MyClass {}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.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.plugin.compiler;\n\nimport javax.lang.model.SourceVersion;\nimport javax.tools.DiagnosticListener;\nimport javax.tools.JavaCompiler;\nimport javax.tools.JavaFileManager;\nimport javax.tools.JavaFileObject;\nimport javax.tools.OptionChecker;\nimport javax.tools.ToolProvider;\n\nimport java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.StreamTokenizer;\nimport java.io.StringWriter;\nimport java.io.UncheckedIOException;\nimport java.nio.charset.Charset;\nimport java.nio.charset.UnsupportedCharsetException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.EnumSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.ServiceLoader;\nimport java.util.Set;\nimport java.util.StringJoiner;\nimport java.util.jar.Attributes;\nimport java.util.jar.JarFile;\nimport java.util.jar.Manifest;\nimport java.util.stream.Stream;\n\nimport org.apache.maven.api.JavaPathType;\nimport org.apache.maven.api.Language;\nimport org.apache.maven.api.PathScope;\nimport org.apache.maven.api.PathType;\nimport org.apache.maven.api.Project;\nimport org.apache.maven.api.ProjectScope;\nimport org.apache.maven.api.Session;\nimport org.apache.maven.api.SourceRoot;\nimport org.apache.maven.api.Toolchain;\nimport org.apache.maven.api.Type;\nimport org.apache.maven.api.annotations.Nonnull;\nimport org.apache.maven.api.annotations.Nullable;\nimport org.apache.maven.api.di.Inject;\nimport org.apache.maven.api.plugin.Log;\nimport org.apache.maven.api.plugin.Mojo;\nimport org.apache.maven.api.plugin.MojoException;\nimport org.apache.maven.api.plugin.annotations.Parameter;\nimport org.apache.maven.api.services.ArtifactManager;\nimport org.apache.maven.api.services.DependencyResolver;\nimport org.apache.maven.api.services.DependencyResolverRequest;\nimport org.apache.maven.api.services.DependencyResolverResult;\nimport org.apache.maven.api.services.MavenException;\nimport org.apache.maven.api.services.MessageBuilder;\nimport org.apache.maven.api.services.MessageBuilderFactory;\nimport org.apache.maven.api.services.ProjectManager;\nimport org.apache.maven.api.services.ToolchainManager;\n\nimport static org.apache.maven.plugin.compiler.SourceDirectory.CLASS_FILE_SUFFIX;\nimport static org.apache.maven.plugin.compiler.SourceDirectory.MODULE_INFO;\n\n/**\n * Base class of Mojos compiling Java source code.\n * This plugin uses the {@link JavaCompiler} interface from JDK 6+.\n * Each instance shall be used only once, then discarded.\n *\n * <h2>Thread-safety</h2>\n * This class is not thread-safe. If this class is used in a multi-thread context,\n * users are responsible for synchronizing all accesses to this <abbr>MOJO</abbr> instance.\n * However, the executor returned by {@link #createExecutor(DiagnosticListener)} can safely\n * launch the compilation in a background thread.\n *\n * @author <a href=\"mailto:trygvis@inamo.no\">Trygve Laugstøl</a>\n * @author Martin Desruisseaux\n * @since 2.0\n */\npublic abstract class AbstractCompilerMojo implements Mojo {\n    /**\n     * Whether to support legacy (and often deprecated) behavior.\n     * This is currently hard-coded to {@code true} for compatibility reason.\n     * TODO: consider making configurable.\n     */\n    static final boolean SUPPORT_LEGACY = true;\n\n    /**\n     * Name of a {@link SourceVersion} enumeration value for a version above 17 (the current Maven target).\n     * The {@code SourceVersion} value cannot be referenced directly because it does not exist in Java 17.\n     * Used for detecting if {@code module-info.class} needs to be patched for reproducible builds.\n     */\n    private static final String RELEASE_22 = \"RELEASE_22\";\n\n    /**\n     * Name of a {@link SourceVersion} enumeration value for a version above 17 (the current Maven target).\n     * The {@code SourceVersion} value cannot be referenced directly because it does not exist in Java 17.\n     * Used for determining the default value of the {@code -proc} compiler option.\n     */\n    private static final String RELEASE_23 = \"RELEASE_23\";\n\n    /**\n     * The executable to use by default if nine is specified.\n     */\n    private static final String DEFAULT_EXECUTABLE = \"javac\";\n\n    /**\n     * The quote character for filenames in shell scripts.\n     * Shall not be used with {@link javax.tools.JavaFileManager}.\n     */\n    static final char QUOTE = '\"';\n\n    // ----------------------------------------------------------------------\n    // Configurables\n    // ----------------------------------------------------------------------\n\n    /**\n     * The {@code --module-version} argument for the Java compiler.\n     * This is ignored if not applicable, e.g., in non-modular projects.\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-module-version\">javac --module-version</a>\n     * @since 4.0.0\n     */\n    @Parameter(property = \"maven.compiler.moduleVersion\", defaultValue = \"${project.version}\")\n    protected String moduleVersion;\n\n    /**\n     * The {@code -encoding} argument for the Java compiler.\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-encoding\">javac -encoding</a>\n     * @since 2.1\n     */\n    @Parameter(property = \"encoding\", defaultValue = \"${project.build.sourceEncoding}\")\n    protected String encoding;\n\n    /**\n     * {@return the character set used for decoding bytes, or null for the platform default}\n     * No warning is emitted in the latter case because as of Java 18, the default is UTF-8,\n     * i.e. the encoding is no longer platform-dependent.\n     */\n    final Charset charset() {\n        if (encoding != null) {\n            try {\n                return Charset.forName(encoding);\n            } catch (UnsupportedCharsetException e) {\n                throw new CompilationFailureException(\"Invalid 'encoding' option: \" + encoding, e);\n            }\n        }\n        return null;\n    }\n\n    /**\n     * The {@code --source} argument for the Java compiler.\n     * <p><b>Notes:</b></p>\n     * <ul>\n     *   <li>Since 3.8.0 the default value has changed from 1.5 to 1.6.</li>\n     *   <li>Since 3.9.0 the default value has changed from 1.6 to 1.7.</li>\n     *   <li>Since 3.11.0 the default value has changed from 1.7 to 1.8.</li>\n     *   <li>Since 4.0.0-beta-2 the default value has been removed.\n     *       As of Java 9, the {@link #release} parameter is preferred.</li>\n     * </ul>\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-source\">javac --source</a>\n     */\n    @Parameter(property = \"maven.compiler.source\")\n    protected String source;\n\n    /**\n     * The {@code --target} argument for the Java compiler.\n     * <p><b>Notes:</b></p>\n     * <ul>\n     *   <li>Since 3.8.0 the default value has changed from 1.5 to 1.6.</li>\n     *   <li>Since 3.9.0 the default value has changed from 1.6 to 1.7.</li>\n     *   <li>Since 3.11.0 the default value has changed from 1.7 to 1.8.</li>\n     *   <li>Since 4.0.0-beta-2 the default value has been removed.\n     *       As of Java 9, the {@link #release} parameter is preferred.</li>\n     * </ul>\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-target\">javac --target</a>\n     */\n    @Parameter(property = \"maven.compiler.target\")\n    protected String target;\n\n    /**\n     * The {@code --release} argument for the Java compiler when the sources do not declare this version.\n     * The suggested way to declare the target Java release is to specify it with the sources like below:\n     *\n     * <pre>{@code\n     * <build>\n     *   <sources>\n     *     <source>\n     *       <directory>src/main/java</directory>\n     *       <targetVersion>17</targetVersion>\n     *     </source>\n     *   </sources>\n     * </build>}</pre>\n     *\n     * If such {@code <targetVersion>} element is found, it has precedence over this {@code release} property.\n     * If a source does not declare a target Java version, then the value of this {@code release} property is\n     * used as a fallback.\n     * If omitted, the compiler will generate bytecodes for the Java version running the compiler.\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-release\">javac --release</a>\n     * @since 3.6\n     */\n    @Parameter(property = \"maven.compiler.release\")\n    protected String release;\n\n    /**\n     * Whether {@link #target} or {@link #release} has a non-blank value.\n     * Used for logging a warning if no target Java version was specified.\n     */\n    private boolean targetOrReleaseSet;\n\n    /**\n     * The highest version supported by the compiler, or {@code null} if not yet determined.\n     *\n     * @see #isVersionEqualOrNewer(String)\n     */\n    private SourceVersion supportedVersion;\n\n    /**\n     * Whether to enable preview language features of the java compiler.\n     * If {@code true}, then the {@code --enable-preview} option will be added to compiler arguments.\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-enable-preview\">javac --enable-preview</a>\n     * @since 3.10.1\n     */\n    @Parameter(property = \"maven.compiler.enablePreview\", defaultValue = \"false\")\n    protected boolean enablePreview;\n\n    /**\n     * The root directories containing the source files to be compiled. If {@code null} or empty,\n     * the directories will be obtained from the {@code <Source>} elements declared in the project.\n     * If non-empty, the project {@code <Source>} elements are ignored. This configuration option\n     * should be used only when there is a need to override the project configuration.\n     *\n     * @deprecated Replaced by the project-wide {@code <sources>} element.\n     */\n    @Parameter\n    @Deprecated(since = \"4.0.0\")\n    protected List<String> compileSourceRoots;\n\n    /**\n     * Additional arguments to be passed verbatim to the Java compiler. This parameter can be used when\n     * the Maven compiler plugin does not provide a parameter for a Java compiler option. It may happen,\n     * for example, for new or preview Java features which are not yet handled by this compiler plugin.\n     *\n     * <p>If an option has a value, the option and the value shall be specified in two separated {@code <arg>}\n     * elements. For example, the {@code -Xmaxerrs 1000} option (for setting the maximal number of errors to\n     * 1000) can be specified as below (together with other options):</p>\n     *\n     * <pre>{@code\n     * <compilerArgs>\n     *   <arg>-Xlint</arg>\n     *   <arg>-Xmaxerrs</arg>\n     *   <arg>1000</arg>\n     *   <arg>J-Duser.language=en_us</arg>\n     * </compilerArgs>}</pre>\n     *\n     * Note that {@code -J} options should be specified only if {@link #fork} is set to {@code true}.\n     * Other options can be specified regardless the {@link #fork} value.\n     * The compiler plugin does not verify whether the arguments given through this parameter are valid.\n     * For this reason, the other parameters provided by the compiler plugin should be preferred when\n     * they exist, because the plugin checks whether the corresponding options are supported.\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-J\">javac -J</a>\n     * @since 3.1\n     */\n    @Parameter\n    protected List<String> compilerArgs;\n\n    /**\n     * The single argument string to be passed to the compiler. To pass multiple arguments such as\n     * {@code -Xmaxerrs 1000} (which are actually two arguments), {@link #compilerArgs} is preferred.\n     *\n     * <p>Note that {@code -J} options should be specified only if {@link #fork} is set to {@code true}.</p>\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-J\">javac -J</a>\n     *\n     * @deprecated Use {@link #compilerArgs} instead.\n     */\n    @Parameter\n    @Deprecated(since = \"4.0.0\")\n    protected String compilerArgument;\n\n    /**\n     * Configures if annotation processing and/or compilation are performed by the compiler.\n     * If set, the value will be appended to the {@code -proc:} compiler option.\n     *\n     * Possible values are:\n     * <ul>\n     *   <li>{@code none} – no annotation processing is performed, only compilation is done.</li>\n     *   <li>{@code only} – only annotation processing is done, no compilation.</li>\n     *   <li>{@code full} – annotation processing followed by compilation is done.</li>\n     * </ul>\n     *\n     * The default value depends on the JDK used for the build.\n     * Prior to Java 23, the default was {@code full},\n     * so annotation processing and compilation were executed without explicit configuration.\n     *\n     * For security reasons, starting with Java 23 no annotation processing is done if neither\n     * any {@code -processor}, {@code -processor path} or {@code -processor module} are set,\n     * or either {@code only} or {@code full} is set.\n     * So literally the default is {@code none}.\n     * It is recommended to always list the annotation processors you want to execute\n     * instead of using the {@code proc} configuration,\n     * to ensure that only desired processors are executed and not any \"hidden\" (and maybe malicious).\n     *\n     * @see #annotationProcessors\n     * @see <a href=\"https://inside.java/2024/06/18/quality-heads-up/\">Inside Java 2024-06-18 Quality Heads up</a>\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-proc\">javac -proc</a>\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#annotation-processing\">javac Annotation Processing</a>\n     * @since 2.2\n     */\n    @Parameter(property = \"maven.compiler.proc\")\n    protected String proc;\n    // Reminder: if above list of legal values is modified, update also addComaSeparated(\"-proc\", …)\n\n    /**\n     * Class names of annotation processors to run.\n     * If not set, the default annotation processors discovery process applies.\n     * If set, the value will be appended to the {@code -processor} compiler option.\n     *\n     * @see #proc\n     * @since 2.2\n     */\n    @Parameter\n    protected String[] annotationProcessors;\n\n    /**\n     * Classpath elements to supply as annotation processor path. If specified, the compiler will detect annotation\n     * processors only in those classpath elements. If omitted (and {@code proc} is set to {@code only} or {@code full}), the default classpath is used to detect annotation\n     * processors. The detection itself depends on the configuration of {@link #annotationProcessors}.\n     * Since JDK 23 by default no annotation processing is performed as long as no processors is listed for security reasons.\n     * Therefore, you should always list the desired processors using this configuration element or {@code annotationProcessorPaths}.\n     *\n     * <p>\n     * Each classpath element is specified using their Maven coordinates (groupId, artifactId, version, classifier,\n     * type). Transitive dependencies are added automatically. Exclusions are supported as well. Example:\n     * </p>\n     *\n     * <pre>\n     * &lt;configuration&gt;\n     *   &lt;annotationProcessorPaths&gt;\n     *     &lt;path&gt;\n     *       &lt;groupId&gt;org.sample&lt;/groupId&gt;\n     *       &lt;artifactId&gt;sample-annotation-processor&lt;/artifactId&gt;\n     *       &lt;version&gt;1.2.3&lt;/version&gt; &lt;!-- Optional - taken from dependency management if not specified --&gt;\n     *       &lt;!-- Optionally exclude transitive dependencies --&gt;\n     *       &lt;exclusions&gt;\n     *         &lt;exclusion&gt;\n     *           &lt;groupId&gt;org.sample&lt;/groupId&gt;\n     *           &lt;artifactId&gt;sample-dependency&lt;/artifactId&gt;\n     *         &lt;/exclusion&gt;\n     *       &lt;/exclusions&gt;\n     *     &lt;/path&gt;\n     *     &lt;!-- ... more ... --&gt;\n     *   &lt;/annotationProcessorPaths&gt;\n     * &lt;/configuration&gt;\n     * </pre>\n     *\n     * <b>Note:</b> Exclusions are supported from version 3.11.0.\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-processor-path\">javac -processorpath</a>\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#annotation-processing\">javac Annotation Processing</a>\n     * @since 3.5\n     *\n     * @deprecated Replaced by ordinary dependencies with {@code <type>} element set to\n     * {@code processor}, {@code classpath-processor} or {@code modular-processor}.\n     */\n    @Parameter\n    @Deprecated(since = \"4.0.0\")\n    protected List<DependencyCoordinate> annotationProcessorPaths;\n\n    /**\n     * Whether to use the Maven dependency management section when resolving transitive dependencies of annotation\n     * processor paths.\n     * <p>\n     * This flag does not enable / disable the ability to resolve the version of annotation processor paths\n     * from dependency management section. It only influences the resolution of transitive dependencies of those\n     * top-level paths.\n     * </p>\n     *\n     * @since 3.12.0\n     *\n     * @deprecated This flag is ignored.\n     * Replaced by ordinary dependencies with {@code <type>} element set to\n     * {@code processor}, {@code classpath-processor} or {@code modular-processor}.\n     */\n    @Deprecated(since = \"4.0.0\")\n    @Parameter(defaultValue = \"false\")\n    protected boolean annotationProcessorPathsUseDepMgmt;\n\n    /**\n     * Whether to generate {@code package-info.class} even when empty.\n     * By default, package info source files that only contain javadoc and no annotation\n     * on the package can lead to no class file being generated by the compiler.\n     * It may cause a file miss on build systems that check for file existence in order to decide what to recompile.\n     *\n     * <p>If {@code true}, the {@code -Xpkginfo:always} compiler option is added if the compiler supports that\n     * extra option. If the extra option is not supported, then a warning is logged and no option is added to\n     * the compiler arguments.</p>\n     *\n     * @see #incrementalCompilation\n     * @since 3.10\n     */\n    @Parameter(property = \"maven.compiler.createMissingPackageInfoClass\", defaultValue = \"false\")\n    protected boolean createMissingPackageInfoClass;\n\n    /**\n     * Whether to generate class files for implicitly referenced files.\n     * If set, the value will be appended to the {@code -implicit:} compiler option.\n     * Standard values are:\n     * <ul>\n     *   <li>{@code class} – automatically generates class files.</li>\n     *   <li>{@code none}  – suppresses class file generation.</li>\n     * </ul>\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-implicit\">javac -implicit</a>\n     * @since 3.10.2\n     */\n    @Parameter(property = \"maven.compiler.implicit\")\n    protected String implicit;\n    // Reminder: if above list of legal values is modified, update also addComaSeparated(\"-implicit\", …)\n\n    /**\n     * Whether to generate metadata for reflection on method parameters.\n     * If {@code true}, the {@code -parameters} option will be added to compiler arguments.\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-parameters\">javac -parameters</a>\n     * @since 3.6.2\n     */\n    @Parameter(property = \"maven.compiler.parameters\", defaultValue = \"false\")\n    protected boolean parameters;\n\n    /**\n     * Whether to include debugging information in the compiled class files.\n     * The amount of debugging information to include is specified by the {@link #debuglevel} parameter.\n     * If this {@code debug} flag is {@code true}, then the {@code -g} option may be added to compiler arguments\n     * with a value determined by the {@link #debuglevel} argument. If this {@code debug} flag is {@code false},\n     * then the {@code -g:none} option will be added to the compiler arguments.\n     *\n     * @see #debuglevel\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-g\">javac -g</a>\n     *\n     * @deprecated Setting this flag to {@code false} is replaced by {@code <debuglevel>none</debuglevel>}.\n     */\n    @Deprecated(since = \"4.0.0\")\n    @Parameter(property = \"maven.compiler.debug\", defaultValue = \"true\")\n    protected boolean debug = true;\n\n    /**\n     * Kinds of debugging information to include in the compiled class files.\n     * Legal values are {@code lines}, {@code vars}, {@code source}, {@code all} and {@code none}.\n     * Values other than {@code all} and {@code none} can be combined in a comma-separated list.\n     *\n     * <p>If debug level is not specified, then the {@code -g} option will <em>not</em> be added,\n     * which means that the default debugging information will be generated\n     * (typically {@code lines} and {@code source} but not {@code vars}).</p>\n     *\n     * <p>If debug level is {@code all}, then only the {@code -g} option is added,\n     * which means that all debugging information will be generated.\n     * If debug level is anything else, then the comma-separated list of keywords\n     * is appended to the {@code -g} command-line switch.</p>\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-g-custom\">javac -g:[lines,vars,source]</a>\n     * @since 2.1\n     */\n    @Parameter(property = \"maven.compiler.debuglevel\")\n    protected String debuglevel;\n    // Reminder: if above list of legal values is modified, update also addComaSeparated(\"-g\", …)\n\n    /**\n     * Whether to optimize the compiled code using the compiler's optimization methods.\n     * @deprecated This property is ignored.\n     */\n    @Deprecated(forRemoval = true)\n    @Parameter(property = \"maven.compiler.optimize\")\n    protected Boolean optimize;\n\n    /**\n     * Whether to show messages about what the compiler is doing.\n     * If {@code true}, then the {@code -verbose} option will be added to compiler arguments.\n     * In addition, files such as {@code target/javac.args} will be generated even on successful compilation.\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#option-verbose\">javac -verbose</a>\n     */\n    @Parameter(property = \"maven.compiler.verbose\", defaultValue = \"false\")\n    protected boolean verbose;\n\n    /**\n     * Whether to provide more details about why a module is rebuilt.\n     * This is used only if {@link #incrementalCompilation} is set to something else than {@code \"none\"}.\n     *\n     * @see #incrementalCompilation\n     */\n    @Parameter(property = \"maven.compiler.showCompilationChanges\", defaultValue = \"false\")\n    protected boolean showCompilationChanges;\n\n    /**\n     * Whether to show source locations where deprecated APIs are used.\n     * If {@code true}, then the {@code -deprecation} option will be added to compiler arguments.\n     * That option is itself a shorthand for {@code -Xlint:deprecation}.\n     *\n     * @see #showWarnings\n     * @see #failOnWarning\n     */\n    @Parameter(property = \"maven.compiler.showDeprecation\", defaultValue = \"false\")\n    protected boolean showDeprecation;\n\n    /**\n     * Whether to show compilation warnings.\n     * If {@code false}, then the {@code -nowarn} option will be added to compiler arguments.\n     * That option is itself a shorthand for {@code -Xlint:none}.\n     *\n     * @see #showDeprecation\n     * @see #failOnWarning\n     */\n    @Parameter(property = \"maven.compiler.showWarnings\", defaultValue = \"true\")\n    protected boolean showWarnings = true;\n\n    /**\n     * Whether the build will stop if there are compilation warnings.\n     * If {@code true}, then the {@code -Werror} option will be added to compiler arguments.\n     *\n     * @see #showWarnings\n     * @see #showDeprecation\n     * @since 3.6\n     */\n    @Parameter(property = \"maven.compiler.failOnWarning\", defaultValue = \"false\")\n    protected boolean failOnWarning;\n\n    /**\n     * Whether the build will stop if there are compilation errors.\n     *\n     * @see #failOnWarning\n     * @since 2.0.2\n     */\n    @Parameter(property = \"maven.compiler.failOnError\", defaultValue = \"true\")\n    protected boolean failOnError = true;\n\n    /**\n     * Sets the name of the output file when compiling a set of sources to a single file.\n     *\n     * <p>expression=\"${project.build.finalName}\"</p>\n     *\n     * @deprecated Bundling many class files into a single file should be done by other plugins.\n     */\n    @Parameter\n    @Deprecated(since = \"4.0.0\", forRemoval = true)\n    protected String outputFileName;\n\n    /**\n     * Timestamp for reproducible output archive entries. It can be either formatted as ISO 8601\n     * {@code yyyy-MM-dd'T'HH:mm:ssXXX} or as an int representing seconds since the epoch (like\n     * <a href=\"https://reproducible-builds.org/docs/source-date-epoch/\">SOURCE_DATE_EPOCH</a>).\n     *\n     * @since 3.12.0\n     *\n     * @deprecated Not used by the compiler plugin since it does not generate archive.\n     */\n    @Deprecated(since = \"4.0.0\", forRemoval = true)\n    @Parameter(defaultValue = \"${project.build.outputTimestamp}\")\n    protected String outputTimestamp;\n\n    /**\n     * The algorithm to use for selecting which files to compile.\n     * Values can be {@code dependencies}, {@code sources}, {@code classes}, {@code rebuild-on-change},\n     * {@code rebuild-on-add}, {@code modules} or {@code none}.\n     *\n     * <p><b>{@code options}:</b>\n     * recompile all source files if the compiler options changed.\n     * Changes are detected on a <i>best-effort</i> basis only.</p>\n     *\n     * <p><b>{@code dependencies}:</b>\n     * recompile all source files if at least one dependency (JAR file) changed since the last build.\n     * This check is based on the last modification times of JAR files.</p>\n     *\n     * <p><b>{@code sources}:</b>\n     * recompile source files modified since the last build.\n     * In addition, if a source file has been deleted, then all source files are recompiled.\n     * This check is based on the modification times of source files\n     * rather than the modification times of the {@code *.class} files.</p>\n     *\n     * <p><b>{@code classes}:</b>\n     * recompile source files ({@code *.java}) associated to no output file ({@code *.class})\n     * or associated to an output file older than the source. This algorithm does not check\n     * if a source file has been removed, potentially leaving non-recompiled classes with\n     * references to classes that no longer exist.</p>\n     *\n     * <p>The {@code sources} and {@code classes} values are partially redundant,\n     * doing the same work in different ways. It is usually not necessary to specify those two values.</p>\n     *\n     * <p><b>{@code modules}:</b>\n     * recompile modules and let the compiler decides which individual files to recompile.\n     * The compiler plugin does not enumerate the source files to recompile (actually, it does not scan at all the\n     * source directories). Instead, it only specifies the module to recompile using the {@code --module} option.\n     * The Java compiler will scan the source directories itself and compile only those source files that are newer\n     * than the corresponding files in the output directory.</p>\n     *\n     * <p><b>{@code rebuild-on-add}:</b>\n     * modifier for recompiling all source files when the addition of a new file is detected.\n     * This flag is effective only when used together with {@code sources} or {@code classes}.\n     * When used with {@code classes}, it provides a way to detect class renaming\n     * (this is not needed with {@code sources} for detecting renaming).</p>\n     *\n     * <p><b>{@code rebuild-on-change}:</b>\n     * modifier for recompiling all source files when a change is detected in at least one source file.\n     * This flag is effective only when used together with {@code sources} or {@code classes}.\n     * It does not rebuild when a new source file is added without change in other files,\n     * unless {@code rebuild-on-add} is also specified.</p>\n     *\n     * <p><b>{@code none}:</b>\n     * the compiler plugin unconditionally specifies all sources to the Java compiler.\n     * This option is mutually exclusive with all other incremental compilation options.</p>\n     *\n     * <h4>Limitations</h4>\n     * In all cases, the current compiler-plugin does not detect structural changes other than file addition or removal.\n     * For example, the plugin does not detect whether a method has been removed in a class.\n     *\n     * <h4>Default value</h4>\n     * The default value depends on the context.\n     * If there is no annotation processor, then the default is {@code \"options,dependencies,sources\"}.\n     * It means that a full rebuild will be done if the compiler options or the dependencies changed,\n     * or if a source file has been deleted. Otherwise, only the modified source files will be recompiled.\n     *\n     * <p>If an annotation processor is present (e.g., {@link #proc} set to a value other than {@code \"none\"}),\n     * then the default value is same as above with the addition of {@code \"rebuild-on-add,rebuild-on-change\"}.\n     * It means that a full rebuild will be done if any kind of change is detected.</p>\n     *\n     * @see #staleMillis\n     * @see #fileExtensions\n     * @see #showCompilationChanges\n     * @see #createMissingPackageInfoClass\n     * @since 4.0.0\n     */\n    @Parameter(property = \"maven.compiler.incrementalCompilation\")\n    protected String incrementalCompilation;\n\n    /**\n     * Whether to enable/disable incremental compilation feature.\n     *\n     * @since 3.1\n     *\n     * @deprecated Replaced by {@link #incrementalCompilation}.\n     * A value of {@code true} in this old property is equivalent to {@code \"dependencies,sources,rebuild-on-add\"}\n     * in the new property, and a value of {@code false} is equivalent to {@code \"classes\"}.\n     */\n    @Deprecated(since = \"4.0.0\")\n    @Parameter(property = \"maven.compiler.useIncrementalCompilation\")\n    protected Boolean useIncrementalCompilation;\n\n    /**\n     * Returns the configuration of the incremental compilation.\n     * If the argument is null or blank, then this method applies\n     * the default values documented in {@link #incrementalCompilation} javadoc.\n     *\n     * @throws MojoException if a value is not recognized, or if mutually exclusive values are specified\n     */\n    final EnumSet<IncrementalBuild.Aspect> incrementalCompilationConfiguration() {\n        if (isAbsent(incrementalCompilation)) {\n            if (useIncrementalCompilation != null) {\n                return useIncrementalCompilation\n                        ? EnumSet.of(\n                                IncrementalBuild.Aspect.DEPENDENCIES,\n                                IncrementalBuild.Aspect.SOURCES,\n                                IncrementalBuild.Aspect.REBUILD_ON_ADD)\n                        : EnumSet.of(IncrementalBuild.Aspect.CLASSES);\n            }\n            return EnumSet.of(\n                    IncrementalBuild.Aspect.OPTIONS,\n                    IncrementalBuild.Aspect.DEPENDENCIES,\n                    IncrementalBuild.Aspect.SOURCES);\n        }\n        return IncrementalBuild.Aspect.parse(incrementalCompilation);\n    }\n\n    /**\n     * Amends the configuration of incremental compilation for the presence of annotation processors.\n     *\n     * @param aspects the configuration to amend if an annotation processor is found\n     * @param dependencyTypes the type of dependencies, for checking if any of them is a processor path\n     */\n    final void amendincrementalCompilation(EnumSet<IncrementalBuild.Aspect> aspects, Set<PathType> dependencyTypes) {\n        if (isAbsent(incrementalCompilation) && hasAnnotationProcessor(dependencyTypes)) {\n            aspects.add(IncrementalBuild.Aspect.REBUILD_ON_ADD);\n            aspects.add(IncrementalBuild.Aspect.REBUILD_ON_CHANGE);\n        }\n    }\n\n    /**\n     * File extensions to check timestamp for incremental build.\n     * Default contains only {@code class} and {@code jar}.\n     *\n     * TODO: Rename with a name making clearer that this parameter is about incremental build.\n     *\n     * @see #incrementalCompilation\n     * @since 3.1\n     */\n    @Parameter(defaultValue = \"class,jar\")\n    protected List<String> fileExtensions;\n\n    /**\n     * The granularity in milliseconds of the last modification\n     * date for testing whether a source needs recompilation.\n     *\n     * @see #incrementalCompilation\n     */\n    @Parameter(property = \"lastModGranularityMs\", defaultValue = \"0\")\n    protected int staleMillis;\n\n    /**\n     * Allows running the compiler in a separate process.\n     * If {@code false}, the plugin uses the built-in compiler, while if {@code true} it will use an executable.\n     *\n     * @see #executable\n     * @see #compilerId\n     * @see #meminitial\n     * @see #maxmem\n     */\n    @Parameter(property = \"maven.compiler.fork\", defaultValue = \"false\")\n    protected boolean fork;\n\n    /**\n     * Requirements for this JDK toolchain for using a different {@code javac} than the one of the JDK used by Maven.\n     * This overrules the toolchain selected by the\n     * <a href=\"https://maven.apache.org/plugins/maven-toolchains-plugin/\">maven-toolchain-plugin</a>.\n     * See <a href=\"https://maven.apache.org/guides/mini/guide-using-toolchains.html\"> Guide to Toolchains</a>\n     * for more info.\n     *\n     * <pre>\n     * &lt;configuration&gt;\n     *   &lt;jdkToolchain&gt;\n     *     &lt;version&gt;11&lt;/version&gt;\n     *   &lt;/jdkToolchain&gt;\n     *   ...\n     * &lt;/configuration&gt;\n     *\n     * &lt;configuration&gt;\n     *   &lt;jdkToolchain&gt;\n     *     &lt;version&gt;1.8&lt;/version&gt;\n     *     &lt;vendor&gt;zulu&lt;/vendor&gt;\n     *   &lt;/jdkToolchain&gt;\n     *   ...\n     * &lt;/configuration&gt;\n     * </pre>\n     *\n     * @see #fork\n     * @see #executable\n     * @since 3.6\n     */\n    @Parameter\n    protected Map<String, String> jdkToolchain;\n\n    /**\n     * Identifier of the compiler to use. This identifier shall match the identifier of a compiler known\n     * to the {@linkplain #jdkToolchain JDK tool chain}, or the {@linkplain JavaCompiler#name() name} of\n     * a {@link JavaCompiler} instance registered as a service findable by {@link ServiceLoader}.\n     * See this <a href=\"non-javac-compilers.html\">guide</a> for more information.\n     * If unspecified, then the {@linkplain ToolProvider#getSystemJavaCompiler() system Java compiler} is used.\n     * The identifier of the system Java compiler is usually {@code javac}.\n     *\n     * @see #fork\n     * @see #executable\n     * @see JavaCompiler#name()\n     */\n    @Parameter(property = \"maven.compiler.compilerId\")\n    protected String compilerId;\n\n    /**\n     * Version of the compiler to use if {@link #fork} is set to {@code true}.\n     * Examples! \"1.3\", \"1.5\".\n     *\n     * @deprecated This parameter is no longer used by the underlying compilers.\n     *\n     * @see #fork\n     */\n    @Deprecated(since = \"4.0.0\", forRemoval = true)\n    @Parameter(property = \"maven.compiler.compilerVersion\")\n    protected String compilerVersion;\n\n    /**\n     * Whether to use the legacy {@code com.sun.tools.javac} API instead of {@code javax.tools} API.\n     *\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/api/java.compiler/javax/tools/package-summary.html\">New API</a>\n     * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/api/jdk.compiler/com/sun/tools/javac/package-summary.html\">Legacy API</a>\n     * @since 3.13\n     *\n     * @deprecated Ignored because the compiler plugin now always use the {@code javax.tools} API.\n     */\n    @Deprecated(since = \"4.0.0\", forRemoval = true)\n    @Parameter(property = \"maven.compiler.forceLegacyJavacApi\")\n    protected Boolean forceLegacyJavacApi;\n\n    /**\n     * Whether to use legacy compiler API.\n     *\n     * @since 3.0\n     *\n     * @deprecated Ignored because {@code java.lang.Compiler} has been deprecated and removed from the JDK.\n     */\n    @Deprecated(since = \"4.0.0\", forRemoval = true)\n    @Parameter(property = \"maven.compiler.forceJavacCompilerUse\")\n    protected Boolean forceJavacCompilerUse;\n\n    /**\n     * Strategy to re use {@code javacc} class created. Legal values are:\n     * <ul>\n     *   <li>{@code reuseCreated} (default) – will reuse already created but in case of multi-threaded builds,\n     *       each thread will have its own instance.</li>\n     *   <li>{@code reuseSame} – the same Javacc class will be used for each compilation even\n     *       for multi-threaded build.</li>\n     *   <li>{@code alwaysNew} – a new Javacc class will be created for each compilation.</li>\n     * </ul>\n     * Note this parameter value depends on the OS/JDK you are using, but the default value should work on most of env.\n     *\n     * @since 2.5\n     *\n     * @deprecated Not supported anymore. The reuse of {@link JavaFileManager} instance is plugin implementation details.\n     */\n    @Deprecated(since = \"4.0.0\", forRemoval = true)\n    @Parameter(property = \"maven.compiler.compilerReuseStrategy\")\n    protected String compilerReuseStrategy;\n\n    /**\n     * @since 2.5\n     *\n     * @deprecated Deprecated as a consequence of {@link #compilerReuseStrategy} deprecation.\n     */\n    @Deprecated(since = \"4.0.0\", forRemoval = true)\n    @Parameter(property = \"maven.compiler.skipMultiThreadWarning\")\n    protected Boolean skipMultiThreadWarning;\n\n    /**\n     * Executable of the compiler to use when {@link #fork} is {@code true}.\n     * If this parameter is specified, then the {@link #jdkToolchain} is ignored.\n     *\n     * @see #jdkToolchain\n     * @see #fork\n     * @see #compilerId\n     */\n    @Parameter(property = \"maven.compiler.executable\")\n    protected String executable;\n\n    /**\n     * Initial size, in megabytes, of the memory allocation pool if {@link #fork} is set to {@code true}.\n     * Examples: \"64\", \"64M\". Suffixes \"k\" (for kilobytes) and \"G\" (for gigabytes) are also accepted.\n     * If no suffix is provided, \"M\" is assumed.\n     *\n     * @see #fork\n     * @since 2.0.1\n     */\n    @Parameter(property = \"maven.compiler.meminitial\")\n    protected String meminitial;\n\n    /**\n     * Maximum size, in megabytes, of the memory allocation pool if {@link #fork} is set to {@code true}.\n     * Examples: \"128\", \"128M\". Suffixes \"k\" (for kilobytes) and \"G\" (for gigabytes) are also accepted.\n     * If no suffix is provided, \"M\" is assumed.\n     *\n     * @see #fork\n     * @since 2.0.1\n     */\n    @Parameter(property = \"maven.compiler.maxmem\")\n    protected String maxmem;\n\n    // ----------------------------------------------------------------------\n    // Read-only parameters\n    // ----------------------------------------------------------------------\n\n    /**\n     * The directory to run the compiler from if fork is true.\n     */\n    @Parameter(defaultValue = \"${project.basedir}\", required = true, readonly = true)\n    protected Path basedir;\n\n    /**\n     * Path to a file where to cache information about the last incremental build.\n     * This is used when \"incremental\" builds are enabled for detecting additions\n     * or removals of source files, or changes in plugin configuration.\n     * This file should be in the output directory and can be deleted at any time\n     */\n    @Parameter(\n            defaultValue =\n                    \"${project.build.directory}/maven-status/${mojo.plugin.descriptor.artifactId}/${mojo.executionId}.cache\",\n            required = true,\n            readonly = true)\n    protected Path mojoStatusPath;\n\n    /**\n     * The current build session instance.\n     */\n    @Inject\n    protected Session session;\n\n    /**\n     * The current project instance.\n     */\n    @Inject\n    protected Project project;\n\n    @Inject\n    protected ProjectManager projectManager;\n\n    @Inject\n    protected ArtifactManager artifactManager;\n\n    @Inject\n    protected ToolchainManager toolchainManager;\n\n    @Inject\n    protected MessageBuilderFactory messageBuilderFactory;\n\n    /**\n     * The logger for reporting information or warnings to the user.\n     * Currently, this is also used for console output.\n     *\n     * <h4>Thread safety</h4>\n     * This logger should be thread-safe if the {@link ToolExecutor} is executed in a background thread.\n     */\n    @Inject\n    protected Log logger;\n\n    /**\n     * Cached value for writing replacement proposal when a deprecated option is used.\n     * This is set to a non-null value when first needed. An empty string means that\n     * this information couldn't be fetched.\n     *\n     * @see #writePlugin(MessageBuilder, String, String)\n     */\n    private String mavenCompilerPluginVersion;\n\n    /**\n     * A tip about how to launch the Java compiler from the command-line.\n     * The command-line may have {@code -J} options before the argument file.\n     * This is non-null if the compilation failed or if Maven is executed in debug mode.\n     */\n    private String tipForCommandLineCompilation;\n\n    /**\n     * {@code MAIN_COMPILE} if this MOJO is for compiling the main code,\n     * or {@code TEST_COMPILE} if compiling the tests.\n     */\n    final PathScope compileScope;\n\n    /**\n     * Creates a new MOJO.\n     *\n     * @param compileScope {@code MAIN_COMPILE} or {@code TEST_COMPILE}\n     */\n    protected AbstractCompilerMojo(PathScope compileScope) {\n        this.compileScope = compileScope;\n    }\n\n    /**\n     * {@return the inclusion filters for the compiler, or an empty list for all Java source files}\n     * The filter patterns are described in {@link java.nio.file.FileSystem#getPathMatcher(String)}.\n     * If no syntax is specified, the default syntax is a derivative of \"glob\" compatible with the\n     * behavior of Maven 3.\n     */\n    protected abstract Set<String> getIncludes();\n\n    /**\n     * {@return the exclusion filters for the compiler, or an empty list if none}\n     * The filter patterns are described in {@link java.nio.file.FileSystem#getPathMatcher(String)}.\n     * If no syntax is specified, the default syntax is a derivative of \"glob\" compatible with the\n     * behavior of Maven 3.\n     */\n    protected abstract Set<String> getExcludes();\n\n    /**\n     * {@return the exclusion filters for the incremental calculation}\n     * Updated source files, if excluded by this filter, will not cause the project to be rebuilt.\n     *\n     * @see SourceFile#ignoreModification\n     */\n    protected abstract Set<String> getIncrementalExcludes();\n\n    /**\n     * {@return whether all includes/excludes matchers specified in the plugin configuration are empty}\n     * This method checks only the plugin configuration. It does not check the {@code <source>} elements.\n     */\n    final boolean hasNoFileMatchers() {\n        return getIncludes().isEmpty()\n                && getExcludes().isEmpty()\n                && getIncrementalExcludes().isEmpty();\n    }\n\n    /**\n     * {@return the destination directory (or class output directory) for class files}\n     * This directory will be given to the {@code -d} Java compiler option.\n     */\n    @Nonnull\n    protected abstract Path getOutputDirectory();\n\n    /**\n     * {@return the {@code --source} argument for the Java compiler}\n     * The default implementation returns the {@link #source} value.\n     */\n    @Nullable\n    protected String getSource() {\n        return source;\n    }\n\n    /**\n     * {@return the {@code --target} argument for the Java compiler}\n     * The default implementation returns the {@link #target} value.\n     */\n    @Nullable\n    protected String getTarget() {\n        return target;\n    }\n\n    /**\n     * {@return the {@code --release} argument for the Java compiler}\n     * The default implementation returns the {@link #release} value.\n     */\n    @Nullable\n    protected String getRelease() {\n        return release;\n    }\n\n    /**\n     * {@return the root directories of Java source code for the given scope}\n     * This method ignores the deprecated {@link #compileSourceRoots} element.\n     *\n     * @param scope whether to get the directories for main code or for the test code\n     */\n    final Stream<SourceRoot> getSourceRoots(ProjectScope scope) {\n        return projectManager.getEnabledSourceRoots(project, scope, Language.JAVA_FAMILY);\n    }\n\n    /**\n     * {@return the root directories of the Java source files to compile, excluding empty directories}\n     * The list needs to be modifiable for allowing the addition of generated source directories.\n     * This is determined from the {@link #compileSourceRoots} plugin configuration if non-empty,\n     * or from {@code <source>} elements otherwise.\n     *\n     * @param outputDirectory the directory where to store the compilation results\n     * @throws IOException if this method needs to walk through directories and that operation failed\n     */\n    final List<SourceDirectory> getSourceDirectories(final Path outputDirectory) throws IOException {\n        if (isAbsent(compileSourceRoots)) {\n            Stream<SourceRoot> roots = getSourceRoots(compileScope.projectScope());\n            return SourceDirectory.fromProject(roots, getRelease(), outputDirectory);\n        } else {\n            return SourceDirectory.fromPluginConfiguration(\n                    compileSourceRoots, moduleOfPreviousExecution(), getRelease(), outputDirectory);\n        }\n    }\n\n    /**\n     * {@return the path where to place generated source files created by annotation processing}\n     */\n    @Nullable\n    protected abstract Path getGeneratedSourcesDirectory();\n\n    /**\n     * Returns the module which is being patched in a multi-release project, or {@code null} if none.\n     * This is used when the {@link CompilerMojo#multiReleaseOutput} deprecated flag is {@code true}.\n     * This module name is handled in a special way because, contrarily to the case where the project\n     * uses the recommended {@code <sources>} elements (in which case all target releases are compiled\n     * in a single Maven Compiler Plugin execution), the Maven Compiler Plugin does not know what have\n     * been compiled for the other releases, because each target release is compiled with an execution\n     * of {@link CompilerMojo} separated from other executions.\n     *\n     * @return the module name in a previous execution of the compiler plugin, or {@code null} if none\n     * @throws IOException if this method needs to walk through directories and that operation failed\n     *\n     * @see CompilerMojo#addImplicitDependencies(ToolExecutor)\n     *\n     * @deprecated For compatibility with the previous way to build multi-release JAR file.\n     *             May be removed after we drop support of the old way to do multi-release.\n     */\n    @Deprecated(since = \"4.0.0\")\n    String moduleOfPreviousExecution() throws IOException {\n        return null;\n    }\n\n    /**\n     * {@return whether the sources contain at least one {@code module-info.java} file}\n     * Note that the sources may contain more than one {@code module-info.java} file\n     * if compiling a project with Module Source Hierarchy.\n     *\n     * <p>If the user explicitly specified a modular or classpath project, then the\n     * {@code module-info.java} is assumed to exist or not without verification.</p>\n     *\n     * <p>The test compiler overrides this method for checking the existence of the\n     * the {@code module-info.class} file in the main output directory instead.</p>\n     *\n     * @param roots root directories of the sources to compile\n     * @throws IOException if this method needed to read a module descriptor and failed\n     */\n    boolean hasModuleDeclaration(final List<SourceDirectory> roots) throws IOException {\n        return switch (project.getPackaging().type().id()) {\n            case Type.CLASSPATH_JAR -> false;\n            case Type.MODULAR_JAR -> true;\n            default -> {\n                for (SourceDirectory root : roots) {\n                    if (root.getModuleInfo().isPresent()) {\n                        yield true;\n                    }\n                }\n                yield false;\n            }\n        };\n    }\n\n    /**\n     * {@return the file where to dump the command-line when debug logging is enabled or when the compilation failed}\n     * For example, if the value is {@code \"javac\"}, then the Java compiler can be launched\n     * from the command-line by typing {@code javac @target/javac.args}.\n     * The debug file will contain the compiler options together with the list of source files to compile.\n     *\n     * <p>Note: debug logging should not be confused with the {@link #debug} flag.</p>\n     *\n     * @see CompilerMojo#debugFileName\n     * @see TestCompilerMojo#debugFileName\n     */\n    @Nullable\n    protected abstract String getDebugFileName();\n\n    /**\n     * {@return the debug file name with its path, or null if none}\n     * This method does not check if the debug file will be written, as the compilation result is not yet known.\n     */\n    final Path getDebugFilePath() {\n        String filename = getDebugFileName();\n        if (isAbsent(filename)) {\n            return null;\n        }\n        // Do not use `this.getOutputDirectory()` because it may be deeper in `classes/META-INF/versions/`.\n        return Path.of(project.getBuild().getOutputDirectory()).resolveSibling(filename);\n    }\n\n    /**\n     * Returns whether the debug file should be written after a successful build.\n     * By default, debug files are written only if the build failed.\n     * However, some options can change this behavior.\n     */\n    final boolean shouldWriteDebugFile() {\n        return verbose || logger.isDebugEnabled();\n    }\n\n    /**\n     * Runs the Java compiler. This method performs the following steps:\n     *\n     * <ol>\n     *   <li>Get a Java compiler by a call to {@link #compiler()}.</li>\n     *   <li>Get the options to give to the compiler by a call to {@link #parseParameters(OptionChecker)}.</li>\n     *   <li>Get an executor with {@link #createExecutor(DiagnosticListener)} with the default listener.</li>\n     *   <li>{@linkplain ToolExecutor#applyIncrementalBuild Apply the incremental build} if enabled.</li>\n     *   <li>{@linkplain ToolExecutor#compile Execute the compilation}.</li>\n     *   <li>Shows messages in the {@linkplain #logger}.</li>\n     * </ol>\n     *\n     * @throws MojoException if the compiler cannot be run\n     */\n    @Override\n    public void execute() throws MojoException {\n        JavaCompiler compiler = compiler();\n        for (SourceVersion version : compiler.getSourceVersions()) {\n            if (supportedVersion == null || version.compareTo(supportedVersion) >= 0) {\n                supportedVersion = version;\n            }\n        }\n        Options configuration = parseParameters(compiler);\n        try {\n            compile(compiler, configuration);\n        } catch (RuntimeException e) {\n            String message = e.getLocalizedMessage();\n            if (message == null) {\n                message = e.getClass().getSimpleName();\n            } else if (e instanceof MojoException) {\n                int s = message.indexOf(System.lineSeparator());\n                if (s >= 0) {\n                    message = message.substring(0, s); // Log only the first line.\n                }\n            }\n            MessageBuilder mb = messageBuilderFactory\n                    .builder()\n                    .strong(\"COMPILATION ERROR: \")\n                    .a(message);\n            logger.error(mb.toString(), verbose ? e : null);\n            if (tipForCommandLineCompilation != null) {\n                logger.info(tipForCommandLineCompilation);\n                tipForCommandLineCompilation = null;\n            }\n            if (failOnError) {\n                throw e;\n            }\n        } catch (IOException e) {\n            logger.error(\"I/O error while compiling the project.\", e);\n            throw new CompilationFailureException(\"I/O error while compiling the project.\", e);\n        }\n    }\n\n    /**\n     * Creates a new task by taking a snapshot of the current configuration of this <abbr>MOJO</abbr>.\n     * This method creates the {@linkplain ToolExecutor#outputDirectory output directory} if it does not already exist.\n     *\n     * <h4>Multi-threading</h4>\n     * This method and the returned objects are not thread-safe.\n     * However, this method takes a snapshot of the configuration of this <abbr>MOJO</abbr>.\n     * Changes in this <abbr>MOJO</abbr> after this method call will not affect the returned executor.\n     * Therefore, the executor can safely be executed in a background thread,\n     * provided that the {@link #logger} is thread-safe.\n     *\n     * @param listener where to send compilation warnings, or {@code null} for the Maven logger\n     * @return the task to execute for compiling the project using the configuration in this <abbr>MOJO</abbr>\n     * @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr>\n     * @throws IOException if an error occurred while creating the output directory or scanning the source directories\n     * @throws MavenException if an error occurred while fetching dependencies\n     */\n    public ToolExecutor createExecutor(DiagnosticListener<? super JavaFileObject> listener) throws IOException {\n        var executor = new ToolExecutor(this, listener);\n        if (!(targetOrReleaseSet || executor.isReleaseSpecifiedForAll())) {\n            MessageBuilder mb = messageBuilderFactory\n                    .builder()\n                    .a(\"No explicit value set for --release or --target. \"\n                            + \"To ensure the same result in different environments, please add\")\n                    .newline()\n                    .newline();\n            writePlugin(mb, \"release\", String.valueOf(Runtime.version().feature()));\n            logger.warn(mb.build());\n        }\n        return executor;\n    }\n\n    /**\n     * {@return the compiler to use for compiling the code}\n     * If {@link #fork} is {@code true}, the returned compiler will be a wrapper for a command line.\n     * Otherwise, it will be the compiler identified by {@link #compilerId} if a value was supplied,\n     * or the standard compiler provided with the Java platform otherwise.\n     *\n     * @throws MojoException if no compiler was found\n     */\n    public JavaCompiler compiler() throws MojoException {\n        /*\n         * Use the `compilerId` as identifier for toolchains.\n         * I.e, we assume that `compilerId` is also the name of the executable binary.\n         */\n        getToolchain().ifPresent((tc) -> {\n            logger.info(\"Toolchain in maven-compiler-plugin is \\\"\" + tc + \"\\\".\");\n            if (executable != null) {\n                logger.warn(\n                        \"Toolchains are ignored because the 'executable' parameter is set to \\\"\" + executable + \"\\\".\");\n            } else {\n                fork = true;\n                if (compilerId == null) {\n                    compilerId = DEFAULT_EXECUTABLE;\n                }\n                // TODO somehow shaky dependency between compilerId and tool executable.\n                executable = tc.findTool(compilerId);\n            }\n        });\n        if (fork) {\n            if (executable == null) {\n                executable = DEFAULT_EXECUTABLE;\n            }\n            return new ForkedCompiler(this);\n        }\n        /*\n         * Search a `javax.tools.JavaCompiler` having a name matching the specified `compilerId`.\n         * This is done before other code that can cause the mojo to return before the lookup is\n         * done, possibly resulting in misconfigured POMs still building. If no `compilerId` was\n         * specified, then the Java compiler bundled with the JDK is used (it may be absent).\n         */\n        if (logger.isDebugEnabled()) {\n            logger.debug(\n                    \"Using \" + (compilerId != null ? (\"compiler \\\"\" + compilerId + '\"') : \"system compiler\") + '.');\n        }\n        if (compilerId == null) {\n            compilerId = DEFAULT_EXECUTABLE;\n            final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n            if (compiler != null) {\n                return compiler;\n            }\n        } else {\n            for (JavaCompiler t : ServiceLoader.load(JavaCompiler.class)) {\n                if (compilerId.equals(t.name())) {\n                    return t;\n                }\n            }\n        }\n        throw new CompilationFailureException(\"No such \\\"\" + compilerId + \"\\\" compiler.\");\n    }\n\n    /**\n     * Parses the parameters declared in the <abbr>MOJO</abbr>.\n     * The {@link #release} parameter is excluded because it is handled in a special way\n     * in order to support the compilation of multi-version projects.\n     *\n     * @param  compiler  the tools to use for verifying the validity of options\n     * @return the options after validation\n     */\n    public Options parseParameters(final OptionChecker compiler) {\n        /*\n         * Options to provide to the compiler, excluding all kinds of path (source files, destination directory,\n         * class-path, module-path, etc.). Some options are validated by Maven in addition of being validated by\n         * the compiler. In those cases, the validation by the compiler is done before the validation by Maven.\n         * For example, Maven will check for illegal values in the \"-g\" option only if the compiler rejected\n         * the fully formatted option (e.g. \"-g:vars,lines\") that we provided to it.\n         */\n        final var configuration = new Options(compiler, logger);\n        configuration.addIfNonBlank(\"--source\", getSource());\n        targetOrReleaseSet = configuration.addIfNonBlank(\"--target\", getTarget());\n        targetOrReleaseSet |= configuration.setRelease(getRelease());\n        configuration.addIfTrue(\"--enable-preview\", enablePreview);\n        configuration.addComaSeparated(\"-proc\", proc, List.of(\"none\", \"only\", \"full\"), null);\n        if (annotationProcessors != null) {\n            var list = new StringJoiner(\",\");\n            for (String p : annotationProcessors) {\n                list.add(p);\n            }\n            configuration.addIfNonBlank(\"-processor\", list.toString());\n        }\n        configuration.addComaSeparated(\"-implicit\", implicit, List.of(\"none\", \"class\"), null);\n        configuration.addIfTrue(\"-parameters\", parameters);\n        configuration.addIfTrue(\"-Xpkginfo:always\", createMissingPackageInfoClass);\n        if (debug) {\n            configuration.addComaSeparated(\n                    \"-g\",\n                    debuglevel,\n                    List.of(\"lines\", \"vars\", \"source\", \"all\", \"none\"),\n                    (options) -> Arrays.asList(options).contains(\"all\") ? new String[0] : options);\n        } else {\n            configuration.addIfTrue(\"-g:none\", true);\n        }\n        configuration.addIfNonBlank(\"--module-version\", moduleVersion);\n        configuration.addIfTrue(\"-deprecation\", showDeprecation);\n        configuration.addIfTrue(\"-nowarn\", !showWarnings);\n        configuration.addIfTrue(\"-Werror\", failOnWarning);\n        configuration.addIfTrue(\"-verbose\", verbose);\n        if (fork) {\n            configuration.addMemoryValue(\"-J-Xms\", \"meminitial\", meminitial, SUPPORT_LEGACY);\n            configuration.addMemoryValue(\"-J-Xmx\", \"maxmem\", maxmem, SUPPORT_LEGACY);\n        }\n        return configuration;\n    }\n\n    /**\n     * Runs the compiler, then shows the result in the Maven logger.\n     *\n     * @param compiler the compiler\n     * @param configuration options to provide to the compiler\n     * @throws IOException if an input file cannot be read\n     * @throws MojoException if the compilation failed\n     */\n    @SuppressWarnings(\"UseSpecificCatch\")\n    private void compile(final JavaCompiler compiler, final Options configuration) throws IOException {\n        final ToolExecutor executor = createExecutor(null);\n        if (!executor.applyIncrementalBuild(this, configuration)) {\n            return;\n        }\n        Throwable failureCause = null;\n        final var compilerOutput = new StringWriter();\n        boolean success;\n        try {\n            success = executor.compile(compiler, configuration, compilerOutput);\n        } catch (Exception | NoClassDefFoundError e) {\n            // `NoClassDefFoundError` may happen if a dependency of an annotation processor is missing.\n            success = false;\n            failureCause = e;\n        }\n        /*\n         * The compilation errors or warnings should have already been reported by `DiagnosticLogger`.\n         * However, the compiler may have other messages not associated to a particular source file.\n         * For example, `ForkedCompiler` uses this writer if the compilation has been interrupted.\n         */\n        String additionalMessage = compilerOutput.toString();\n        if (!additionalMessage.isBlank()) {\n            if (success || failureCause != null) { // Keep the error level for the exception message.\n                logger.warn(additionalMessage);\n            } else {\n                logger.error(additionalMessage);\n            }\n        }\n        if (failureCause != null) {\n            String message = failureCause.getMessage();\n            if (message != null) {\n                logger.error(message);\n            } else {\n                logger.error(failureCause);\n            }\n        }\n        /*\n         * In case of failure, or if debugging is enabled, dump the options to a file.\n         * By default, the file will have the \".args\" extension.\n         */\n        if (!success || shouldWriteDebugFile()) {\n            IOException suppressed = null;\n            try {\n                writeDebugFile(executor, configuration, success);\n                if (success && tipForCommandLineCompilation != null) {\n                    logger.debug(tipForCommandLineCompilation);\n                    tipForCommandLineCompilation = null;\n                }\n            } catch (IOException e) {\n                suppressed = e;\n            }\n            if (!success) {\n                var message = new StringBuilder(100)\n                        .append(\"Cannot compile \")\n                        .append(project.getId())\n                        .append(' ')\n                        .append(compileScope.projectScope().id())\n                        .append(\" classes.\");\n                if (executor.listener instanceof DiagnosticLogger diagnostic) {\n                    diagnostic.firstError(failureCause).ifPresent((c) -> message.append(System.lineSeparator())\n                            .append(\"The first error is: \")\n                            .append(c));\n                }\n                var failure = new CompilationFailureException(message.toString(), failureCause);\n                if (suppressed != null) {\n                    failure.addSuppressed(suppressed);\n                }\n                throw failure;\n            }\n            if (suppressed != null) {\n                throw suppressed;\n            }\n        }\n        /*\n         * Workaround for MCOMPILER-542, needed only if a modular project is compiled with a JDK older than Java 22.\n         * Note: a previous version used as an heuristic way to detect if Reproducible Build was enabled. This check\n         * has been removed because Reproducible Build are enabled by default in Maven now.\n         */\n        if (!isVersionEqualOrNewer(RELEASE_22)) {\n            Path moduleDescriptor = executor.outputDirectory.resolve(MODULE_INFO + CLASS_FILE_SUFFIX);\n            if (Files.isRegularFile(moduleDescriptor)) {\n                byte[] oridinal = Files.readAllBytes(moduleDescriptor);\n                byte[] modified = ByteCodeTransformer.patchJdkModuleVersion(oridinal, getRelease(), logger);\n                if (modified != null) {\n                    Files.write(moduleDescriptor, modified);\n                }\n            }\n        }\n    }\n\n    /**\n     * Returns whether the compiler supports the given source version or newer versions.\n     * The specified source version shall be the name of one of the {@link SourceVersion} enumeration values.\n     * Note that a return value of {@code true} does not mean that the compiler supports that exact version,\n     * as it may supports only newer versions.\n     */\n    private boolean isVersionEqualOrNewer(String sourceVersion) {\n        final SourceVersion requested;\n        try {\n            requested = SourceVersion.valueOf(sourceVersion);\n        } catch (IllegalArgumentException e) {\n            // The current tool is from a JDK older than the one for the requested source release.\n            return false;\n        }\n        if (supportedVersion == null) {\n            supportedVersion = SourceVersion.latestSupported();\n        }\n        return supportedVersion.compareTo(requested) >= 0;\n    }\n\n    /**\n     * Returns whether the given string is null or empty, ignoring spaces.\n     * This is a convenience for a frequent check, and also for clarity.\n     */\n    private static boolean isAbsent(String c) {\n        return (c == null) || c.isBlank();\n    }\n\n    /**\n     * Returns whether the given array is null or empty.\n     * Defined as a complement of {@link #isAbsent(Collection)}.\n     */\n    private static boolean isAbsent(Object[] c) {\n        return (c == null) || c.length == 0;\n    }\n\n    /**\n     * Returns whether the given collection is null or empty.\n     * This is a convenience for a frequent check, and also for clarity.\n     */\n    static boolean isAbsent(Collection<?> c) {\n        return (c == null) || c.isEmpty();\n    }\n\n    /**\n     * {@return the tool chain specified by the user in plugin parameters}\n     */\n    private Optional<Toolchain> getToolchain() {\n        if (jdkToolchain != null) {\n            List<Toolchain> tcs = toolchainManager.getToolchains(session, \"jdk\", jdkToolchain);\n            if (!isAbsent(tcs)) {\n                return Optional.of(tcs.get(0));\n            }\n        }\n        return toolchainManager.getToolchainFromBuildContext(session, \"jdk\");\n    }\n\n    /**\n     * Returns the module name as declared in the given {@code module-info.java} source file.\n     * This approach is less reliable than reading the compiled {@code module-info.class} file,\n     * but is sometime needed when the compiled file is not yet available.\n     *\n     * @param source the source file to parse (may be null or not exist)\n     * @return the module name, or {@code null} if not found\n     *\n     * @deprecated This is invoked only by other deprecated methods.\n     */\n    @Deprecated(since = \"4.0.0\")\n    final String parseModuleInfoName(Path source) throws IOException {\n        if (source != null && Files.exists(source)) {\n            Charset charset = charset();\n            try (BufferedReader in =\n                    (charset != null) ? Files.newBufferedReader(source, charset) : Files.newBufferedReader(source)) {\n                var tokenizer = new StreamTokenizer(in);\n                tokenizer.slashSlashComments(true);\n                tokenizer.slashStarComments(true);\n                int t;\n                while ((t = tokenizer.nextToken()) != StreamTokenizer.TT_EOF) {\n                    if (t == StreamTokenizer.TT_WORD && \"module\".equals(tokenizer.sval)) {\n                        do {\n                            t = tokenizer.nextToken();\n                        } while (t == StreamTokenizer.TT_EOL);\n                        if (t == StreamTokenizer.TT_WORD) {\n                            return tokenizer.sval;\n                        }\n                        break; // Found a \"module\" keyword followed by something that we didn't recognized.\n                    }\n                }\n            }\n        }\n        return null;\n    }\n\n    /**\n     * {@return all dependencies grouped by the path types where to place them}\n     * If the module-path contains any filename-based dependency and this <abbr>MOJO</abbr>\n     * is compiling the main code, then a warning will be logged.\n     *\n     * @param hasModuleDeclaration whether to allow placement of dependencies on the module-path.\n     * @throws IOException if an I/O error occurred while fetching dependencies\n     * @throws MavenException if an error occurred while fetching dependencies for a reason other than I/O.\n     */\n    final DependencyResolverResult resolveDependencies(boolean hasModuleDeclaration) throws IOException {\n        DependencyResolver resolver = session.getService(DependencyResolver.class);\n        if (resolver == null) { // Null value happen during tests, depending on the mock used.\n            return null;\n        }\n        var allowedTypes = EnumSet.of(JavaPathType.CLASSES, JavaPathType.PROCESSOR_CLASSES);\n        if (hasModuleDeclaration) {\n            allowedTypes.add(JavaPathType.MODULES);\n            allowedTypes.add(JavaPathType.PROCESSOR_MODULES);\n        }\n        DependencyResolverResult dependencies = resolver.resolve(DependencyResolverRequest.builder()\n                .session(session)\n                .project(project)\n                .requestType(DependencyResolverRequest.RequestType.RESOLVE)\n                .pathScope(compileScope)\n                .pathTypeFilter(allowedTypes)\n                .build());\n        /*\n         * Report errors or warnings. If possible, we rethrow the first exception directly without\n         * wrapping in a `MojoException` for making the stack-trace a little bit easier to analyze.\n         */\n        Exception exception = null;\n        for (Exception cause : dependencies.getExceptions()) {\n            if (exception != null) {\n                exception.addSuppressed(cause);\n            } else if (cause instanceof UncheckedIOException e) {\n                exception = e.getCause();\n            } else if (cause instanceof RuntimeException || cause instanceof IOException) {\n                exception = cause;\n            } else {\n                exception = new CompilationFailureException(\"Cannot collect the compile-time dependencies.\", cause);\n            }\n        }\n        if (exception != null) {\n            if (exception instanceof IOException e) {\n                throw e;\n            } else {\n                throw (RuntimeException) exception; // A ClassCastException here would be a bug in above loop.\n            }\n        }\n        if (ProjectScope.MAIN.equals(compileScope.projectScope())) {\n            String warning = dependencies.warningForFilenameBasedAutomodules().orElse(null);\n            if (warning != null) { // Do not use Optional.ifPresent(…) for avoiding confusing source class name.\n                logger.warn(warning);\n            }\n        }\n        return dependencies;\n    }\n\n    /**\n     * Adds paths to the annotation processor dependencies. Paths are added to the list associated\n     * to the {@link JavaPathType#PROCESSOR_CLASSES} entry of given map, which should be modifiable.\n     *\n     * @param addTo the modifiable map and lists where to append more paths to annotation processor dependencies\n     * @throws MojoException if an error occurred while resolving the dependencies\n     *\n     * @deprecated Replaced by ordinary dependencies with {@code <type>} element set to\n     * {@code processor}, {@code classpath-processor} or {@code modular-processor}.\n     */\n    @Deprecated(since = \"4.0.0\")\n    @SuppressWarnings(\"UseSpecificCatch\")\n    final void resolveProcessorPathEntries(Map<PathType, Collection<Path>> addTo) throws MojoException {\n        List<DependencyCoordinate> dependencies = annotationProcessorPaths;\n        if (!isAbsent(dependencies)) {\n            try {\n                List<org.apache.maven.api.DependencyCoordinates> coords = dependencies.stream()\n                        .map((coord) -> coord.toCoordinate(project, session))\n                        .toList();\n                Session sessionWithRepo =\n                        session.withRemoteRepositories(projectManager.getRemoteProjectRepositories(project));\n                addTo.merge(\n                        JavaPathType.PROCESSOR_CLASSES,\n                        sessionWithRepo\n                                .getService(DependencyResolver.class)\n                                .resolve(DependencyResolverRequest.builder()\n                                        .session(sessionWithRepo)\n                                        .dependencies(coords)\n                                        .managedDependencies(project.getManagedDependencies())\n                                        .requestType(DependencyResolverRequest.RequestType.RESOLVE)\n                                        .pathScope(PathScope.MAIN_RUNTIME)\n                                        .build())\n                                .getPaths(),\n                        (oldPaths, newPaths) -> {\n                            oldPaths.addAll(newPaths);\n                            return oldPaths;\n                        });\n            } catch (MojoException e) {\n                throw e;\n            } catch (Exception e) {\n                throw new CompilationFailureException(\n                        \"Resolution of annotationProcessorPath dependencies failed: \" + e.getMessage(), e);\n            }\n        }\n    }\n\n    /**\n     * {@return whether an annotation processor seems to be present}\n     *\n     * @param dependencyTypes the type of dependencies, for checking if any of them is a processor path\n     *\n     * @see #incrementalCompilation\n     */\n    private boolean hasAnnotationProcessor(final Set<PathType> dependencyTypes) {\n        if (isAbsent(proc)) {\n            /*\n             * If the `proc` parameter was not specified, its default value depends on the Java version.\n             * It was \"full\" prior Java 23 and become \"none if no other processor option\" since Java 23.\n             */\n            if (isVersionEqualOrNewer(RELEASE_23)) {\n                if (isAbsent(annotationProcessors) && isAbsent(annotationProcessorPaths)) {\n                    return dependencyTypes.contains(JavaPathType.PROCESSOR_CLASSES)\n                            || dependencyTypes.contains(JavaPathType.PROCESSOR_MODULES);\n                }\n            }\n        } else if (proc.equalsIgnoreCase(\"none\")) {\n            return false;\n        }\n        return true;\n    }\n\n    /**\n     * Ensures that the directory for generated sources exists, and adds it to the list of source directories\n     * known to the project manager. This is used for adding the output of annotation processor.\n     * The returned set is either empty or a singleton.\n     *\n     * @param dependencyTypes the type of dependencies, for checking if any of them is a processor path\n     * @return the added directory in a singleton set, or an empty set if none\n     * @throws IOException if the directory cannot be created\n     */\n    final Set<Path> addGeneratedSourceDirectory(final Set<PathType> dependencyTypes) throws IOException {\n        Path generatedSourcesDirectory = getGeneratedSourcesDirectory();\n        if (generatedSourcesDirectory == null) {\n            return Set.of();\n        }\n        /*\n         * Do not create an empty directory if this plugin is not going to generate new source files.\n         * However, if a directory already exists, use it because maybe its content was generated by\n         * another plugin executed before the compiler plugin.\n         */\n        if (hasAnnotationProcessor(dependencyTypes)) {\n            // `createDirectories(Path)` does nothing if the directory already exists.\n            generatedSourcesDirectory = Files.createDirectories(generatedSourcesDirectory);\n        } else if (Files.notExists(generatedSourcesDirectory)) {\n            return Set.of();\n        }\n        ProjectScope scope = compileScope.projectScope();\n        projectManager.addSourceRoot(project, scope, Language.JAVA_FAMILY, generatedSourcesDirectory.toAbsolutePath());\n        if (logger.isDebugEnabled()) {\n            var sb = new StringBuilder(\"Adding \\\"\")\n                    .append(generatedSourcesDirectory)\n                    .append(\"\\\" to \")\n                    .append(scope.id())\n                    .append(\"-compile source roots. New roots are:\");\n            projectManager\n                    .getEnabledSourceRoots(project, scope, Language.JAVA_FAMILY)\n                    .forEach((p) -> {\n                        sb.append(System.lineSeparator()).append(\"    \").append(p.directory());\n                    });\n            logger.debug(sb.toString());\n        }\n        return Set.of(generatedSourcesDirectory);\n    }\n\n    /**\n     * Formats the {@code <plugin>} block of code for configuring this plugin with the given option.\n     *\n     * @param mb the message builder where to format the block of code\n     * @param option name of the XML sub-element of {@code <configuration>} for the option\n     * @param value the option value, or {@code null} if none\n     */\n    private void writePlugin(MessageBuilder mb, String option, String value) {\n        if (mavenCompilerPluginVersion == null) {\n            try (InputStream is = AbstractCompilerMojo.class.getResourceAsStream(\"/\" + JarFile.MANIFEST_NAME)) {\n                if (is != null) {\n                    mavenCompilerPluginVersion =\n                            new Manifest(is).getMainAttributes().getValue(Attributes.Name.IMPLEMENTATION_VERSION);\n                }\n            } catch (IOException e) {\n                // noop\n            }\n            if (mavenCompilerPluginVersion == null) {\n                mavenCompilerPluginVersion = \"\";\n            }\n        }\n        mb.a(\"    <plugin>\").newline();\n        mb.a(\"      <groupId>org.apache.maven.plugins</groupId>\").newline();\n        mb.a(\"      <artifactId>maven-compiler-plugin</artifactId>\").newline();\n        if (!isAbsent(mavenCompilerPluginVersion)) {\n            mb.a(\"      <version>\")\n                    .a(mavenCompilerPluginVersion)\n                    .a(\"</version>\")\n                    .newline();\n        }\n        mb.a(\"      <configuration>\").newline();\n        mb.a(\"        <\").a(option).a('>').a(value).a(\"</\").a(option).a('>').newline();\n        mb.a(\"      </configuration>\").newline();\n        mb.a(\"    </plugin>\").newline();\n    }\n\n    /**\n     * Dumps the compiler options together with the list of source files into a debug file.\n     * This is invoked in case of compilation failure, or if debug is enabled.\n     *\n     * <h4>Syntax</h4>\n     * The arguments within a file can be separated by spaces or new line characters.\n     * If a file name contains embedded spaces, then the whole file name must be between double quotation marks.\n     * The -J options are not supported.\n     *\n     * @param executor the executor that compiled the classes\n     * @param configuration options provided to the compiler\n     * @param showBaseVersion whether the tip shown to user suggests the base Java release instead of the last one\n     * @throws IOException if an error occurred while writing the debug file\n     */\n    private void writeDebugFile(final ToolExecutor executor, final Options configuration, final boolean showBaseVersion)\n            throws IOException {\n        final Path debugFilePath = getDebugFilePath();\n        if (debugFilePath == null) {\n            logger.warn(\"The <debugFileName> parameter should not be empty.\");\n            return;\n        }\n        final var commandLine = new StringBuilder(\"For trying to compile from the command-line, use:\");\n        Path dir = basedir;\n        if (dir != null) { // Should never be null, but it has been observed with some Maven versions.\n            try {\n                dir = Path.of(System.getProperty(\"user.dir\")).relativize(dir);\n            } catch (IllegalArgumentException e) {\n                // Ignore, keep the absolute path.\n            }\n            String chdir = dir.toString();\n            if (!chdir.isEmpty()) {\n                boolean isWindows = (File.separatorChar == '\\\\');\n                commandLine\n                        .append(System.lineSeparator())\n                        .append(\"    \")\n                        .append(isWindows ? \"chdir \" : \"cd \")\n                        .append(chdir);\n            }\n        }\n        commandLine.append(System.lineSeparator()).append(\"    \").append(executable != null ? executable : compilerId);\n        Path pathForRelease = debugFilePath;\n        /*\n         * The following loop will iterate over all groups of source files compiled for the same Java release,\n         * starting with the base release. If the project is not a multi-release project, it iterates only once.\n         * If the compilation failed, the loop will stop after the first Java release for which an error occurred.\n         */\n        final int count = executor.sourcesForDebugFile.size();\n        final int indexToShow = showBaseVersion ? 0 : count - 1;\n        for (int i = 0; i < count; i++) {\n            final SourcesForRelease sources = executor.sourcesForDebugFile.get(i);\n            if (i != 0) {\n                String version = sources.outputForRelease.getFileName().toString();\n                String filename = debugFilePath.getFileName().toString();\n                int s = filename.lastIndexOf('.');\n                if (s >= 0) {\n                    filename = filename.substring(0, s) + '-' + version + filename.substring(s);\n                } else {\n                    filename = filename + '-' + version;\n                }\n                pathForRelease = debugFilePath.resolveSibling(filename);\n            }\n            /*\n             * Write the `javac.args` or `javac-<version>.args` file where `<version>` is the targeted Java release.\n             * The `-J` options need to be on the command line rather than in the file, and therefore can be written\n             * only once.\n             */\n            try (BufferedWriter out = Files.newBufferedWriter(pathForRelease)) {\n                configuration.setRelease(sources.getReleaseString());\n                configuration.format((i == indexToShow) ? commandLine : null, out);\n                for (Map.Entry<PathType, Collection<Path>> entry : sources.dependencySnapshot.entrySet()) {\n                    writeOption(out, entry.getKey(), entry.getValue());\n                }\n                for (Map.Entry<String, Set<Path>> root : sources.roots.entrySet()) {\n                    String moduleName = root.getKey();\n                    writeOption(out, SourcePathType.valueOf(moduleName), root.getValue());\n                }\n                out.write(\"-d \" + QUOTE);\n                out.write(relativize(sources.outputForRelease).toString());\n                out.write(QUOTE);\n                out.newLine();\n                for (final Path file : sources.files) {\n                    out.write(QUOTE);\n                    out.write(relativize(file).toString());\n                    out.write(QUOTE);\n                    out.newLine();\n                }\n            }\n        }\n        Path path = relativize(showBaseVersion ? debugFilePath : pathForRelease);\n        tipForCommandLineCompilation = commandLine.append(\" @\").append(path).toString();\n    }\n\n    /**\n     * Writes the paths for the given Java compiler option.\n     * Used for the {@code *.args} debug file, because files will be written between quotes.\n     *\n     * @param out where to write\n     * @param type the type of path to write as a compiler option\n     * @param files the paths associated to the specified option\n     * @throws IOException in an error occurred while writing to the output\n     */\n    private void writeOption(BufferedWriter out, PathType type, Collection<Path> files) throws IOException {\n        if (!files.isEmpty()) {\n            files = files.stream().map(this::relativize).toList();\n            String[] options = type.option(files);\n            for (int i = 0; i < options.length; i++) {\n                String element = options[i];\n                if (i == 0) {\n                    out.write(element);\n                } else {\n                    out.write(' ');\n                    out.write(QUOTE);\n                    out.write(element);\n                    out.write(QUOTE);\n                }\n            }\n            out.newLine();\n        }\n    }\n\n    /**\n     * Makes the given file relative to the base directory if the path is inside the project directory tree.\n     * The check for the project directory tree (starting from the root of all sub-projects) is for avoiding\n     * to relativize the paths to JAR files in the Maven local repository for example.\n     *\n     * @param  file  the path to make relative to the base directory\n     * @return the given path, potentially relative to the base directory\n     */\n    private Path relativize(Path file) {\n        final Path dir = basedir;\n        if (dir != null) { // Should never be null, but it has been observed with some Maven versions.\n            Path root = project.getRootDirectory();\n            if (root != null && file.startsWith(root)) {\n                try {\n                    file = dir.relativize(file);\n                } catch (IllegalArgumentException e) {\n                    // Ignore, keep the absolute path.\n                }\n            }\n        }\n        return file;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/ByteCodeTransformer.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.plugin.compiler;\n\nimport java.util.ArrayList;\nimport java.util.HashSet;\n\nimport org.apache.maven.api.plugin.Log;\nimport org.objectweb.asm.ClassReader;\nimport org.objectweb.asm.ClassVisitor;\nimport org.objectweb.asm.ClassWriter;\nimport org.objectweb.asm.ModuleVisitor;\nimport org.objectweb.asm.Opcodes;\n\n/**\n * This class is the central place where all byte code transformations are applied.\n * Using a separated class reduces the risk of loading the {@code org.objectweb.asm}\n * classes when not needed. The transformations can be:\n *\n * <ul>\n *   <li>Generating {@code package-info.class} class if the {@code -Xpkginfo:always} option is not supported.</li>\n *   <li>Dropping detailed JDK version from the {@code module-info.class} file (workaround for\n *       <a href=\"https://issues.apache.org/jira/browse/MCOMPILER-542\">MCOMPILER-542</a>).</li>\n * </ul>\n *\n * <b>Note:</b> {@code package-info.class} generation has been removed because it is not needed anymore for\n * incremental build. If nevertheless desired, it can be done with the {@code -Xpkginfo:always} option with\n * compilers derived from OpenJDK.\n *\n * @see <a href=\"https://bugs.openjdk.org/browse/JDK-8318913\">JDK-8318913</a>\n */\nfinal class ByteCodeTransformer {\n    private ByteCodeTransformer() {}\n\n    /**\n     * JDK-8318913 workaround: Patch module-info.class to set the java release version for java/jdk modules.\n     * This patch is needed only for Java versions older than 22.\n     *\n     * @param originalBytecode the byte code to patch\n     * @return the patched byte code, or {@code null} if no change is needed\n     *\n     * @see <a href=\"https://issues.apache.org/jira/browse/MCOMPILER-542\">MCOMPILER-542</a>\n     * @see <a href=\"https://bugs.openjdk.org/browse/JDK-8318913\">JDK-8318913</a>\n     * @see #MODULE_VERSION_FIX\n     */\n    static byte[] patchJdkModuleVersion(byte[] originalBytecode, String javaVersion, Log log) {\n        var modulesModified = new ArrayList<String>();\n        var foundVersions = new HashSet<String>();\n        var reader = new ClassReader(originalBytecode);\n        var writer = new ClassWriter(0);\n        var classVisitor = new ClassVisitor(Opcodes.ASM9, writer) {\n            @Override\n            public ModuleVisitor visitModule(String name, int access, String version) {\n                ModuleVisitor originalModuleVisitor = super.visitModule(name, access, version);\n                return new ModuleVisitor(Opcodes.ASM9, originalModuleVisitor) {\n                    @Override\n                    public void visitRequire(String module, int access, String version) {\n                        // Check if the module name matches the java/jdk modules\n                        if (version != null && (module.startsWith(\"java.\") || module.startsWith(\"jdk.\"))) {\n                            // Patch the version from the java.* and jdk.* modules\n                            // with the --release N version.\n                            super.visitRequire(module, access, javaVersion);\n                            foundVersions.add(version);\n                            modulesModified.add(module);\n                        } else {\n                            // Keep the original require statement\n                            super.visitRequire(module, access, version);\n                        }\n                    }\n                };\n            }\n        };\n        reader.accept(classVisitor, 0);\n        if (modulesModified.isEmpty()) {\n            return null;\n        }\n        log.info(String.format(\n                \"JDK-8318913 workaround: patched module-info.class requires version from %s to [%s] on %d JDK modules %s\",\n                foundVersions, javaVersion, modulesModified.size(), modulesModified));\n\n        return writer.toByteArray();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/CompilationFailureException.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.plugin.compiler;\n\nimport org.apache.maven.api.plugin.MojoException;\n\n/**\n * Thrown when the Maven compiler plugin cannot complete the project compilation.\n *\n * @author <a href=\"mailto:jason@maven.org\">Jason van Zyl</a>\n * @since 2.0\n */\n@SuppressWarnings(\"serial\")\npublic class CompilationFailureException extends MojoException {\n    /**\n     * Creates a new exception with the given message.\n     *\n     * @param message the short message\n     */\n    public CompilationFailureException(String message) {\n        super(message);\n    }\n\n    /**\n     * Creates a new exception with the given message and cause.\n     *\n     * @param message the short message\n     * @param cause the cause of the failure, or {@code null} if none\n     */\n    public CompilationFailureException(String message, Throwable cause) {\n        super(message, cause);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.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.plugin.compiler;\n\nimport javax.lang.model.SourceVersion;\nimport javax.tools.DiagnosticListener;\nimport javax.tools.JavaFileObject;\nimport javax.tools.OptionChecker;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.lang.module.ModuleDescriptor;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.List;\nimport java.util.Set;\nimport java.util.TreeMap;\nimport java.util.stream.Stream;\n\nimport org.apache.maven.api.JavaPathType;\nimport org.apache.maven.api.PathScope;\nimport org.apache.maven.api.PathType;\nimport org.apache.maven.api.ProducedArtifact;\nimport org.apache.maven.api.SourceRoot;\nimport org.apache.maven.api.Type;\nimport org.apache.maven.api.annotations.Nonnull;\nimport org.apache.maven.api.annotations.Nullable;\nimport org.apache.maven.api.plugin.MojoException;\nimport org.apache.maven.api.plugin.annotations.Mojo;\nimport org.apache.maven.api.plugin.annotations.Parameter;\n\nimport static org.apache.maven.plugin.compiler.SourceDirectory.CLASS_FILE_SUFFIX;\nimport static org.apache.maven.plugin.compiler.SourceDirectory.JAVA_FILE_SUFFIX;\nimport static org.apache.maven.plugin.compiler.SourceDirectory.MODULE_INFO;\n\n/**\n * Compiles application sources.\n * Each instance shall be used only once, then discarded.\n *\n * @author <a href=\"mailto:jason@maven.org\">Jason van Zyl</a>\n * @author Martin Desruisseaux\n * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html\">javac Command</a>\n * @since 2.0\n */\n@Mojo(name = \"compile\", defaultPhase = \"compile\")\npublic class CompilerMojo extends AbstractCompilerMojo {\n    /**\n     * Set this to {@code true} to bypass compilation of main sources.\n     * Its use is not recommended, but quite convenient on occasion.\n     */\n    @Parameter(property = \"maven.main.skip\")\n    protected boolean skipMain;\n\n    /**\n     * Specify where to place generated source files created by annotation processing.\n     *\n     * @since 2.2\n     */\n    @Parameter(defaultValue = \"${project.build.directory}/generated-sources/annotations\")\n    protected Path generatedSourcesDirectory;\n\n    /**\n     * A set of inclusion filters for the compiler.\n     */\n    @Parameter\n    protected Set<String> includes;\n\n    /**\n     * A set of exclusion filters for the compiler.\n     */\n    @Parameter\n    protected Set<String> excludes;\n\n    /**\n     * A set of exclusion filters for the incremental calculation.\n     * Updated source files, if excluded by this filter, will not cause the project to be rebuilt.\n     *\n     * <h4>Limitation</h4>\n     * In the current implementation, those exclusion filters are applied for added or removed files,\n     * but not yet for removed files.\n     *\n     * @since 3.11\n     */\n    @Parameter\n    protected Set<String> incrementalExcludes;\n\n    /**\n     * The directory for compiled classes.\n     *\n     * @see #getOutputDirectory()\n     */\n    @Parameter(defaultValue = \"${project.build.outputDirectory}\", required = true, readonly = true)\n    protected Path outputDirectory;\n\n    /**\n     * Projects main artifact.\n     */\n    @Parameter(defaultValue = \"${project.mainArtifact}\", readonly = true, required = true)\n    protected ProducedArtifact projectArtifact;\n\n    /**\n     * When set to {@code true}, the classes will be placed in {@code META-INF/versions/${release}}.\n     * <p>\n     * <strong>Note:</strong> A jar is only a multi-release jar if {@code META-INF/MANIFEST.MF} contains\n     * {@code Multi-Release: true}. You need to set this by configuring the <a href=\n     * \"https://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html\">maven-jar-plugin</a>.\n     * This implies that you cannot test a multi-release jar using the {@link #outputDirectory}.\n     * </p>\n     *\n     * @since 3.7.1\n     *\n     * @deprecated Replaced by specifying the {@code <targetVersion>} value inside a {@code <source>} element.\n     */\n    @Parameter\n    @Deprecated(since = \"4.0.0\")\n    protected boolean multiReleaseOutput;\n\n    /**\n     * The file where to dump the command-line when debug is activated or when the compilation failed.\n     * For example, if the value is {@code \"javac\"}, then the Java compiler can be launched from the\n     * command-line by typing {@code javac @target/javac.args}.\n     * The debug file will contain the compiler options together with the list of source files to compile.\n     *\n     * <p>By default, this debug file is written only if the compilation of main code failed.\n     * The writing of the debug files can be forced by setting the {@link #verbose} flag to {@code true}\n     * or by specifying the {@code --verbose} option to Maven on the command-line.</p>\n     *\n     * @since 3.10.0\n     */\n    @Parameter(defaultValue = \"javac.args\")\n    protected String debugFileName;\n\n    /**\n     * Target directory that have been temporarily created as symbolic link before compilation.\n     * This is used as a workaround for the fact that, when compiling a modular project with\n     * all the module-related compiler options, the classes are written in a directory with\n     * the module name. It does not fit in the {@code META-INF/versions/<release>} pattern.\n     * Temporary symbolic link is a workaround for this problem.\n     *\n     * <h4>Example</h4>\n     * When compiling the {@code my.app} module for Java 17, the desired output directory is:\n     *\n     * <blockquote>{@code target/classes/META-INF/versions/17}</blockquote>\n     *\n     * But {@code javac}, when used with the {@code --module-source-path} option,\n     * will write the classes in the following directory:\n     *\n     * <blockquote>{@code target/classes/META-INF/versions/17/my.app}</blockquote>\n     *\n     * We workaround this problem with a symbolic link which redirects {@code 17/my.app} to {@code 17}.\n     * We need to do this only when compiling multi-release project in the old deprecated way.\n     * When using the recommended {@code <sources>} approach, the plugins are designed to work\n     * with the directory layout produced by {@code javac} instead of fighting against it.\n     *\n     * @deprecated For compatibility with the previous way to build multi-release JAR file.\n     *             May be removed after we drop support of the old way to do multi-release.\n     */\n    @Deprecated(since = \"4.0.0\")\n    private ModuleDirectoryRemover directoryLevelToRemove;\n\n    /**\n     * Creates a new compiler <abbr>MOJO</abbr> for the main code.\n     */\n    public CompilerMojo() {\n        super(PathScope.MAIN_COMPILE);\n    }\n\n    /**\n     * Runs the Java compiler on the main source code.\n     * If {@link #skipMain} is {@code true}, then this method logs a message and does nothing else.\n     * Otherwise, this method executes the steps described in the method of the parent class.\n     *\n     * @throws MojoException if the compiler cannot be run.\n     */\n    @Override\n    public void execute() throws MojoException {\n        if (skipMain) {\n            logger.info(\"Not compiling main sources\");\n            return;\n        }\n        try {\n            super.execute();\n        } finally {\n            try (ModuleDirectoryRemover r = directoryLevelToRemove) {\n                // Implicit call to directoryLevelToRemove.close().\n            } catch (IOException e) {\n                throw new CompilationFailureException(\"I/O error while organizing multi-release classes.\", e);\n            }\n        }\n        @SuppressWarnings(\"LocalVariableHidesMemberVariable\")\n        Path outputDirectory = getOutputDirectory();\n        if (Files.isDirectory(outputDirectory) && projectArtifact != null) {\n            artifactManager.setPath(projectArtifact, outputDirectory);\n        }\n    }\n\n    /**\n     * Parses the parameters declared in the <abbr>MOJO</abbr>.\n     *\n     * @param  compiler  the tools to use for verifying the validity of options\n     * @return the options after validation\n     */\n    @Override\n    @SuppressWarnings(\"deprecation\")\n    public Options parseParameters(final OptionChecker compiler) {\n        Options configuration = super.parseParameters(compiler);\n        configuration.addUnchecked(compilerArgs);\n        configuration.addUnchecked(compilerArgument);\n        return configuration;\n    }\n\n    /**\n     * {@return the path where to place generated source files created by annotation processing on the main classes}\n     */\n    @Nullable\n    @Override\n    protected Path getGeneratedSourcesDirectory() {\n        return generatedSourcesDirectory;\n    }\n\n    /**\n     * {@return the inclusion filters for the compiler, or an empty set for all Java source files}\n     */\n    @Override\n    protected Set<String> getIncludes() {\n        return (includes != null) ? includes : Set.of();\n    }\n\n    /**\n     * {@return the exclusion filters for the compiler, or an empty set if none}\n     */\n    @Override\n    protected Set<String> getExcludes() {\n        return (excludes != null) ? excludes : Set.of();\n    }\n\n    /**\n     * {@return the exclusion filters for the incremental calculation, or an empty set if none}\n     */\n    @Override\n    protected Set<String> getIncrementalExcludes() {\n        return (incrementalExcludes != null) ? incrementalExcludes : Set.of();\n    }\n\n    /**\n     * {@return the destination directory for main class files}\n     * If {@link #multiReleaseOutput} is true <em>(deprecated)</em>,\n     * the output will be in a {@code META-INF/versions} subdirectory.\n     */\n    @Nonnull\n    @Override\n    protected Path getOutputDirectory() {\n        if (SUPPORT_LEGACY && multiReleaseOutput && release != null) {\n            return DirectoryHierarchy.PACKAGE\n                    .outputDirectoryForReleases(outputDirectory)\n                    .resolve(release);\n        }\n        return outputDirectory;\n    }\n\n    /**\n     * {@return the file where to dump the command-line when debug is activated or when the compilation failed}\n     *\n     * @see #debugFileName\n     */\n    @Nullable\n    @Override\n    protected String getDebugFileName() {\n        return debugFileName;\n    }\n\n    /**\n     * Creates a new task for compiling the main classes.\n     *\n     * @param listener where to send compilation warnings, or {@code null} for the Maven logger\n     * @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr>\n     * @return the task to execute for compiling the main code using the configuration in this <abbr>MOJO</abbr>\n     * @throws IOException if an error occurred while creating the output directory or scanning the source directories\n     */\n    @Override\n    public ToolExecutor createExecutor(DiagnosticListener<? super JavaFileObject> listener) throws IOException {\n        ToolExecutor executor = super.createExecutor(listener);\n        if (SUPPORT_LEGACY && multiReleaseOutput) {\n            addImplicitDependencies(executor);\n        }\n        return executor;\n    }\n\n    /**\n     * {@return whether the project has at least one module-info file}\n     * If no such file is found in the code to be compiled by this <abbr>MOJO</abbr> execution,\n     * then this method searches in the multi-release codes compiled by previous executions.\n     *\n     * @param roots root directories of the sources to compile\n     * @throws IOException if this method needed to read a module descriptor and failed\n     *\n     * @deprecated For compatibility with the previous way to build multi-release JAR file.\n     *             May be removed after we drop support of the old way to do multi-release.\n     */\n    @Override\n    @Deprecated(since = \"4.0.0\")\n    final boolean hasModuleDeclaration(final List<SourceDirectory> roots) throws IOException {\n        boolean hasModuleDeclaration = super.hasModuleDeclaration(roots);\n        if (SUPPORT_LEGACY && !hasModuleDeclaration && multiReleaseOutput) {\n            String type = project.getPackaging().type().id();\n            if (!Type.CLASSPATH_JAR.equals(type)) {\n                for (Path p : getOutputDirectoryPerVersion().values()) {\n                    p = p.resolve(SourceDirectory.MODULE_INFO + SourceDirectory.CLASS_FILE_SUFFIX);\n                    if (Files.exists(p)) {\n                        return true;\n                    }\n                }\n            }\n        }\n        return hasModuleDeclaration;\n    }\n\n    /**\n     * {@return the output directory of each target Java version}\n     * By convention, {@link SourceVersion#RELEASE_0} stands for the base version.\n     *\n     * @throws IOException if this method needs to walk through directories and that operation failed\n     *\n     * @deprecated For compatibility with the previous way to build multi-release JAR file.\n     *             May be removed after we drop support of the old way to do multi-release.\n     */\n    @Deprecated(since = \"4.0.0\")\n    private TreeMap<SourceVersion, Path> getOutputDirectoryPerVersion() throws IOException {\n        final Path root = DirectoryHierarchy.PACKAGE.outputDirectoryForReleases(outputDirectory);\n        if (Files.notExists(root)) {\n            return null;\n        }\n        final var paths = new TreeMap<SourceVersion, Path>();\n        Files.walk(root, 1).forEach((path) -> {\n            SourceVersion version;\n            if (path.equals(root)) {\n                path = outputDirectory;\n                version = SourceVersion.RELEASE_0;\n            } else {\n                try {\n                    version = SourceVersion.valueOf(\"RELEASE_\" + path.getFileName());\n                } catch (IllegalArgumentException e) {\n                    throw new CompilationFailureException(\"Invalid version number for \" + path, e);\n                }\n            }\n            if (paths.put(version, path) != null) {\n                throw new CompilationFailureException(\"Duplicated version number for \" + path);\n            }\n        });\n        return paths;\n    }\n\n    /**\n     * Adds the compilation outputs of previous Java releases to the class-path of module-path.\n     * This method should be invoked only when compiling a multi-release <abbr>JAR</abbr> in the\n     * old deprecated way.\n     *\n     * <p>The {@code executor} argument may be {@code null} if the caller is only interested in the\n     * module name, with no executor to modify. The module name found by this method is specific to\n     * the way that projects are organized when {@link #multiReleaseOutput} is {@code true}.</p>\n     *\n     * @param  executor  the executor where to add implicit dependencies, or {@code null} if none\n     * @return the module name, or {@code null} if none\n     * @throws IOException if this method needs to walk through directories and that operation failed\n     *\n     * @deprecated For compatibility with the previous way to build multi-release JAR file.\n     *             May be removed after we drop support of the old way to do multi-release.\n     */\n    @Deprecated(since = \"4.0.0\")\n    private String addImplicitDependencies(final ToolExecutor executor) throws IOException {\n        final TreeMap<SourceVersion, Path> paths = getOutputDirectoryPerVersion();\n        /*\n         * Search for the module name. If many module-info classes are found,\n         * the most basic one (with lowest Java release number) is selected.\n         */\n        String moduleName = null;\n        for (Path path : paths.values()) {\n            path = path.resolve(MODULE_INFO + CLASS_FILE_SUFFIX);\n            if (Files.exists(path)) {\n                try (InputStream in = Files.newInputStream(path)) {\n                    moduleName = ModuleDescriptor.read(in).name();\n                }\n                break;\n            }\n        }\n        /*\n         * If no module name was found in the classes compiled for previous Java releases,\n         * search in the source files for the Java release of the current compilation unit.\n         */\n        if (moduleName == null) {\n            final Stream<Path> sourceDirectories;\n            if (executor != null) {\n                sourceDirectories = executor.sourceDirectories.stream().map(dir -> dir.root);\n            } else if (isAbsent(compileSourceRoots)) {\n                sourceDirectories = getSourceRoots(compileScope.projectScope()).map(SourceRoot::directory);\n            } else {\n                sourceDirectories = compileSourceRoots.stream().map(Path::of);\n            }\n            for (Path root : sourceDirectories.toList()) {\n                moduleName = parseModuleInfoName(root.resolve(MODULE_INFO + JAVA_FILE_SUFFIX));\n                if (moduleName != null) {\n                    break;\n                }\n            }\n        }\n        if (executor != null) {\n            /*\n             * Add previous versions as dependencies on the class-path or module-path, depending on whether\n             * the project is modular. Each path should be on either the class-path or module-path, but not\n             * both. If a path for a modular project seems needed on the class-path, it may be a sign that\n             * other options are not used correctly (e.g., `--source-path` versus `--module-source-path`).\n             */\n            PathType type = JavaPathType.CLASSES;\n            if (moduleName != null) {\n                type = JavaPathType.patchModule(moduleName);\n                directoryLevelToRemove = ModuleDirectoryRemover.create(executor.outputDirectory, moduleName);\n            }\n            if (!paths.isEmpty()) {\n                executor.dependencies(type).addAll(paths.descendingMap().values());\n            }\n        }\n        return moduleName;\n    }\n\n    /**\n     * {@return the module name in a previous execution of the compiler plugin, or {@code null} if none}\n     *\n     * @deprecated For compatibility with the previous way to build multi-release JAR file.\n     *             May be removed after we drop support of the old way to do multi-release.\n     */\n    @Override\n    @Deprecated(since = \"4.0.0\")\n    final String moduleOfPreviousExecution() throws IOException {\n        if (SUPPORT_LEGACY && multiReleaseOutput) {\n            return addImplicitDependencies(null);\n        }\n        return super.moduleOfPreviousExecution();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/DependencyCoordinate.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.plugin.compiler;\n\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.Optional;\nimport java.util.Set;\n\nimport org.apache.maven.api.Exclusion;\nimport org.apache.maven.api.Project;\nimport org.apache.maven.api.Session;\nimport org.apache.maven.api.plugin.MojoException;\nimport org.apache.maven.api.services.DependencyCoordinatesFactory;\nimport org.apache.maven.api.services.DependencyCoordinatesFactoryRequest;\n\n/**\n * Simple representation of Maven-coordinates of a dependency.\n *\n * @author Andreas Gudian\n * @since 3.4\n *\n * @deprecated Used for {@link AbstractCompilerMojo#annotationProcessorPaths}, which is deprecated.\n */\n@Deprecated(since = \"4.0.0\")\npublic final class DependencyCoordinate {\n    private String groupId;\n\n    private String artifactId;\n\n    private String version;\n\n    private String classifier;\n\n    private String type = \"jar\";\n\n    private Set<DependencyExclusion> exclusions;\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(groupId, artifactId, version, classifier, type, exclusions);\n    }\n\n    @Override\n    public boolean equals(Object obj) {\n        if (this == obj) {\n            return true;\n        }\n        return obj instanceof DependencyCoordinate other\n                && Objects.equals(groupId, other.groupId)\n                && Objects.equals(artifactId, other.artifactId)\n                && Objects.equals(version, other.version)\n                && Objects.equals(classifier, other.classifier)\n                && Objects.equals(type, other.type)\n                && Objects.equals(exclusions, other.exclusions);\n    }\n\n    @Override\n    public String toString() {\n        return groupId + \":\" + artifactId + (version != null ? \":\" + version : \"\")\n                + (classifier != null ? \":\" + classifier : \"\") + (type != null ? \".\" + type : \"\");\n    }\n\n    /**\n     * Converts this coordinate to the Maven API.\n     *\n     * @param project the current project\n     * @param session the current build session instance\n     * @return this coordinate as Maven API\n     */\n    org.apache.maven.api.DependencyCoordinates toCoordinate(Project project, Session session) {\n        return session.getService(DependencyCoordinatesFactory.class)\n                .create(DependencyCoordinatesFactoryRequest.builder()\n                        .session(session)\n                        .groupId(groupId)\n                        .artifactId(artifactId)\n                        .classifier(classifier)\n                        .type(type)\n                        .version(version)\n                        .version(getAnnotationProcessorPathVersion(project))\n                        .exclusions(toExclusions(exclusions))\n                        .build());\n    }\n\n    private String getAnnotationProcessorPathVersion(Project project) throws MojoException {\n        if (version != null) {\n            return version;\n        } else {\n            if (classifier == null) {\n                classifier = \"\"; // Needed for comparison with dep.getClassifier() because of method contract.\n            }\n            List<org.apache.maven.api.DependencyCoordinates> managedDependencies = project.getManagedDependencies();\n            return findManagedVersion(managedDependencies)\n                    .orElseThrow(() -> new CompilationFailureException(String.format(\n                            \"Cannot find version for annotation processor path '%s'.%nThe version needs to be either\"\n                                    + \" provided directly in the plugin configuration or via dependency management.\",\n                            this)));\n        }\n    }\n\n    private Optional<String> findManagedVersion(List<org.apache.maven.api.DependencyCoordinates> managedDependencies) {\n        return managedDependencies.stream()\n                .filter(dep -> Objects.equals(dep.getGroupId(), groupId)\n                        && Objects.equals(dep.getArtifactId(), artifactId)\n                        && Objects.equals(dep.getClassifier(), classifier)\n                        && Objects.equals(dep.getType().id(), type))\n                .findAny()\n                .map(d -> d.getVersionConstraint().toString());\n    }\n\n    private static Collection<Exclusion> toExclusions(Set<DependencyExclusion> exclusions) {\n        if (exclusions == null || exclusions.isEmpty()) {\n            return List.of();\n        }\n        return exclusions.stream()\n                .map(e -> (Exclusion) new Exclusion() {\n                    @Override\n                    public String getGroupId() {\n                        return e.groupId;\n                    }\n\n                    @Override\n                    public String getArtifactId() {\n                        return e.artifactId;\n                    }\n                })\n                .toList();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/DependencyExclusion.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.plugin.compiler;\n\nimport java.util.Objects;\n\n/**\n * Simple representation of a Maven dependency exclusion.\n *\n * @deprecated Used for {@link AbstractCompilerMojo#annotationProcessorPaths}, which is deprecated.\n */\n@Deprecated(since = \"4.0.0\")\npublic final class DependencyExclusion {\n    String groupId;\n\n    String artifactId;\n\n    private String classifier;\n\n    private String extension = \"jar\";\n\n    @Override\n    public boolean equals(Object obj) {\n        if (this == obj) {\n            return true;\n        }\n        return obj instanceof DependencyExclusion other\n                && Objects.equals(groupId, other.groupId)\n                && Objects.equals(artifactId, other.artifactId)\n                && Objects.equals(classifier, other.classifier)\n                && Objects.equals(extension, other.extension);\n    }\n\n    @Override\n    public int hashCode() {\n        return Objects.hash(groupId, artifactId, classifier, extension);\n    }\n\n    @Override\n    public String toString() {\n        return groupId + \":\" + artifactId + (classifier != null ? \":\" + classifier : \"\")\n                + (extension != null ? \".\" + extension : \"\");\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/DiagnosticLogger.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.plugin.compiler;\n\nimport javax.tools.Diagnostic;\nimport javax.tools.DiagnosticListener;\nimport javax.tools.JavaFileObject;\n\nimport java.nio.file.Path;\nimport java.util.Arrays;\nimport java.util.LinkedHashMap;\nimport java.util.Locale;\nimport java.util.Map;\nimport java.util.Optional;\n\nimport org.apache.maven.api.plugin.Log;\nimport org.apache.maven.api.services.MessageBuilder;\nimport org.apache.maven.api.services.MessageBuilderFactory;\n\n/**\n * A Java compiler diagnostic listener which send the messages to the Maven logger.\n *\n * @author Martin Desruisseaux\n */\nfinal class DiagnosticLogger implements DiagnosticListener<JavaFileObject> {\n    /**\n     * The logger where to send diagnostics.\n     */\n    private final Log logger;\n\n    /**\n     * The factory for creating message builders.\n     */\n    private final MessageBuilderFactory messageBuilderFactory;\n\n    /**\n     * The locale for compiler message.\n     */\n    private final Locale locale;\n\n    /**\n     * The base directory with which to relativize the paths to source files.\n     */\n    private final Path directory;\n\n    /**\n     * Number of errors or warnings.\n     */\n    private int numErrors, numWarnings;\n\n    /**\n     * Number of messages received for each code.\n     */\n    private final Map<String, Integer> codeCount;\n\n    /**\n     * The first error, or {@code null} if none.\n     */\n    private String firstError;\n\n    /**\n     * Creates a listener which will send the diagnostics to the given logger.\n     *\n     * @param logger the logger where to send diagnostics\n     * @param messageBuilderFactory the factory for creating message builders\n     * @param locale the locale for compiler message\n     * @param directory the base directory with which to relativize the paths to source files\n     */\n    DiagnosticLogger(Log logger, MessageBuilderFactory messageBuilderFactory, Locale locale, Path directory) {\n        this.logger = logger;\n        this.messageBuilderFactory = messageBuilderFactory;\n        this.locale = locale;\n        this.directory = directory;\n        codeCount = new LinkedHashMap<>();\n    }\n\n    /**\n     * Makes the given file relative to the base directory.\n     *\n     * @param  file  the path to make relative to the base directory\n     * @return the given path, potentially relative to the base directory\n     */\n    private String relativize(String file) {\n        if (directory != null) {\n            try {\n                return directory.relativize(Path.of(file)).toString();\n            } catch (IllegalArgumentException e) {\n                // Ignore, keep the absolute path.\n            }\n        }\n        return file;\n    }\n\n    /**\n     * Invoked when the compiler emitted a warning.\n     *\n     * @param diagnostic the warning emitted by the Java compiler\n     */\n    @Override\n    public void report(Diagnostic<? extends JavaFileObject> diagnostic) {\n        String message = diagnostic.getMessage(locale);\n        if (message == null || message.isBlank()) {\n            return;\n        }\n        MessageBuilder record = messageBuilderFactory.builder();\n        record.a(message);\n        JavaFileObject source = diagnostic.getSource();\n        Diagnostic.Kind kind = diagnostic.getKind();\n        String style;\n        switch (kind) {\n            case ERROR:\n                style = \".error:-bold,f:red\";\n                break;\n            case MANDATORY_WARNING:\n            case WARNING:\n                style = \".warning:-bold,f:yellow\";\n                break;\n            default:\n                style = \".info:-bold,f:blue\";\n                if (diagnostic.getLineNumber() == Diagnostic.NOPOS) {\n                    source = null; // Some messages are generic, e.g. \"Recompile with -Xlint:deprecation\".\n                }\n                break;\n        }\n        if (source != null) {\n            record.newline().a(\"    at \").a(relativize(source.getName()));\n            long line = diagnostic.getLineNumber();\n            long column = diagnostic.getColumnNumber();\n            if (line != Diagnostic.NOPOS || column != Diagnostic.NOPOS) {\n                record.style(style).a('[');\n                if (line != Diagnostic.NOPOS) {\n                    record.a(line);\n                }\n                if (column != Diagnostic.NOPOS) {\n                    record.a(',').a(column);\n                }\n                record.a(']').resetStyle();\n            }\n        }\n        String log = record.toString();\n        switch (kind) {\n            case ERROR:\n                if (firstError == null) {\n                    firstError = message;\n                }\n                logger.error(log);\n                numErrors++;\n                break;\n            case MANDATORY_WARNING:\n            case WARNING:\n                logger.warn(log);\n                numWarnings++;\n                break;\n            default:\n                logger.info(log);\n                break;\n        }\n        // Statistics\n        String code = diagnostic.getCode();\n        if (code != null) {\n            codeCount.merge(code, 1, (old, initial) -> old + 1);\n        }\n    }\n\n    /**\n     * Returns the first error, if any.\n     *\n     * @param cause if compilation failed with an exception, the cause\n     */\n    Optional<String> firstError(Throwable cause) {\n        return Optional.ofNullable(cause != null && firstError == null ? cause.getMessage() : firstError);\n    }\n\n    /**\n     * Reports summary after the compilation finished.\n     */\n    void logSummary() {\n        MessageBuilder message = messageBuilderFactory.builder();\n        final String patternForCount;\n        if (!codeCount.isEmpty()) {\n            @SuppressWarnings(\"unchecked\")\n            Map.Entry<String, Integer>[] entries = codeCount.entrySet().toArray(Map.Entry[]::new);\n            Arrays.sort(entries, (a, b) -> Integer.compare(b.getValue(), a.getValue()));\n            patternForCount = patternForCount(Math.max(entries[0].getValue(), Math.max(numWarnings, numErrors)));\n            message.strong(\"Summary of compiler messages:\").newline();\n            for (Map.Entry<String, Integer> entry : entries) {\n                int count = entry.getValue();\n                message.format(patternForCount, count, entry.getKey()).newline();\n            }\n        } else {\n            patternForCount = patternForCount(Math.max(numWarnings, numErrors));\n        }\n        if ((numWarnings | numErrors) != 0) {\n            message.strong(\"Total:\");\n        }\n        if (numWarnings != 0) {\n            writeCount(message, patternForCount, numWarnings, \"warning\");\n        }\n        if (numErrors != 0) {\n            writeCount(message, patternForCount, numErrors, \"error\");\n        }\n        logger.info(message.toString());\n    }\n\n    /**\n     * {@return the pattern for formatting the specified number followed by a label}\n     * The given number should be the widest number to format.\n     * A margin of 4 spaces is added at the beginning of the line.\n     */\n    private static String patternForCount(int n) {\n        return \"    %\" + Integer.toString(n).length() + \"d %s\";\n    }\n\n    /**\n     * Appends the count of warnings or errors, making them plural if needed.\n     */\n    private static void writeCount(MessageBuilder message, String patternForCount, int count, String name) {\n        message.newline();\n        message.format(patternForCount, count, name);\n        if (count > 1) {\n            message.append('s');\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/DirectoryHierarchy.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.plugin.compiler;\n\nimport javax.lang.model.SourceVersion;\n\nimport java.nio.file.Path;\nimport java.util.Locale;\n\n/**\n * The way that source files are organized in a file system directory hierarchy.\n * <a href=\"https://docs.oracle.com/en/java/javase/25/docs/specs/man/javac.html#directory-hierarchies\">Directory\n * hierarchies</a> are <i>package hierarchy</i>, <i>module hierarchy</i> and <i>module source hierarchy</i>, but\n * for the purpose of the Maven Compiler Plugin we do not distinguish between the two latter.\n *\n * @see <a href=\"https://docs.oracle.com/en/java/javase/25/docs/specs/man/javac.html#directory-hierarchies\">Directory hierarchies</a>\n */\npublic enum DirectoryHierarchy {\n    /**\n     * Project using package hierarchy. This is the hierarchy used by all Java projects before Java 9.\n     * Note that it does not necessarily implies a class-path project. A modular project can still use\n     * the package hierarchy if the project contains only one module.\n     */\n    PACKAGE(\"versions\"),\n\n    /**\n     * Project using package hierarchy, but in which a {@code module-info} file has been detected.\n     * This is used for compilation of tests. For the main code, we pretend that the hierarchy is\n     * {@link #MODULE_SOURCE} and move the directory output after compilation. Therefore, this\n     * enumeration value can be understood as \"pseudo module source hierarchy\".\n     *\n     * @see ModuleDirectoryRemover\n     *\n     * @deprecated Used only for compatibility with Maven 3.\n     */\n    @Deprecated\n    PACKAGE_WITH_MODULE(\"versions\"),\n\n    /**\n     * A multi-module project using module source hierarchy. It could also be a module hierarchy,\n     * as the Maven Compiler Plugin does not need to distinguish <i>module hierarchy</i> and\n     * <i>module source hierarchy</i>.\n     */\n    MODULE_SOURCE(\"versions-modular\");\n\n    /**\n     * The {@value} directory.\n     */\n    static final String META_INF = \"META-INF\";\n\n    /**\n     * Name of the {@code META-INF/} sub-directory where multi-release outputs are stored.\n     */\n    private final String versionDirectory;\n\n    /**\n     * Creates a new enumeration value.\n     *\n     * @param versionDirectory name of the {@code META-INF/} sub-directory where multi-release outputs are stored\n     */\n    DirectoryHierarchy(String versionDirectory) {\n        this.versionDirectory = versionDirectory;\n    }\n\n    /**\n     * Returns the directory where to write the compiled class files for all Java releases.\n     * The standard path for {@link #PACKAGE} hierarchy is {@code META-INF/versions}.\n     * The caller shall add the version number to the returned path.\n     *\n     * @param outputDirectory usually the value of {@link SourceDirectory#outputDirectory}\n     * @return the directory for all versions\n     */\n    public Path outputDirectoryForReleases(Path outputDirectory) {\n        // TODO: use Path.resolve(String, String...) with Java 22.\n        return outputDirectory.resolve(META_INF).resolve(versionDirectory);\n    }\n\n    /**\n     * Returns the directory where to write the compiled class files for a specific Java release.\n     * The standard path is {@code META-INF/versions/${release}} where {@code ${release}} is the\n     * numerical value of the {@code release} argument. However for {@link #MODULE_SOURCE} case,\n     * the returned path is rather {@code META-INF/versions-modular/${release}}.\n     * The latter is non-standard because there is no standard multi-module <abbr>JAR</abbr> formats as of 2025.\n     * The use of {@code \"versions-modular\"} is for allowing other plugins such as Maven <abbr>JAR</abbr> plugin\n     * to avoid confusion with the standard case.\n     *\n     * @param outputDirectory usually the value of {@link SourceDirectory#outputDirectory}\n     * @param release the release, or {@code null} for the default release\n     * @return the directory for the classes of the specified version\n     */\n    public Path outputDirectoryForReleases(Path outputDirectory, SourceVersion release) {\n        if (release == null) {\n            release = SourceVersion.latestSupported();\n        }\n        String version = release.name(); // TODO: replace by runtimeVersion() in Java 18.\n        version = version.substring(version.lastIndexOf('_') + 1);\n        return outputDirectoryForReleases(outputDirectory).resolve(version);\n    }\n\n    /**\n     * Returns a string representation for use in error message.\n     *\n     * @return human-readable string representation\n     */\n    @Override\n    public String toString() {\n        return name().replace('_', ' ').toLowerCase(Locale.US);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/ForkedCompiler.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.plugin.compiler;\n\nimport javax.annotation.processing.Processor;\nimport javax.tools.DiagnosticListener;\nimport javax.tools.JavaCompiler;\nimport javax.tools.JavaFileManager;\nimport javax.tools.JavaFileObject;\n\nimport java.io.IOException;\nimport java.io.UncheckedIOException;\nimport java.io.Writer;\nimport java.util.Locale;\n\n/**\n * A compiler which is executed by invoking a command-line tool.\n *\n * @author Martin Desruisseaux\n */\nfinal class ForkedCompiler extends ForkedTool implements JavaCompiler {\n    /**\n     * Creates a new forked compiler.\n     *\n     * @param  mojo  the MOJO from which to get the configuration\n     */\n    ForkedCompiler(final AbstractCompilerMojo mojo) {\n        super(mojo);\n    }\n\n    /**\n     * Creates a task for launching the compilation.\n     *\n     * @param out where to send additional compiler output\n     * @param fileManager the {@link ForkedToolSources} instance created by {@link #getStandardFileManager}\n     * @param diagnosticListener currently ignored\n     * @param options compiler options (should be {@link Options#options})\n     * @param classes names of classes to be processed by annotation processing (currently ignored)\n     * @param compilationUnits the source files to compile\n     * @return the compilation task to run\n     */\n    @Override\n    public CompilationTask getTask(\n            Writer out,\n            JavaFileManager fileManager,\n            DiagnosticListener<? super JavaFileObject> diagnosticListener,\n            Iterable<String> options,\n            Iterable<String> classes,\n            Iterable<? extends JavaFileObject> compilationUnits) {\n        return new CompilationTask() {\n            /**\n             * Adds root modules to be taken into account during module resolution.\n             * Currently ignored, caller should use compiler options instead.\n             */\n            @Override\n            public void addModules(Iterable<String> moduleNames) {}\n\n            /**\n             * Sets processors for annotation processing, bypassing the normal discovery mechanism.\n             * Ignored because we cannot pass an instance of a Java object to a command-line.\n             */\n            @Override\n            public void setProcessors(Iterable<? extends Processor> processors) {}\n\n            /**\n             * Sets the locale to be applied when formatting diagnostics and other localized data.\n             * Currently ignored.\n             */\n            @Override\n            public void setLocale(Locale locale) {}\n\n            /**\n             * Performs this compilation task.\n             *\n             * @return true if all the files compiled without errors\n             */\n            @Override\n            public Boolean call() {\n                try {\n                    return run(out, (ForkedToolSources) fileManager, options, compilationUnits);\n                } catch (IOException e) {\n                    throw new UncheckedIOException(e);\n                }\n            }\n        };\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/ForkedTool.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.plugin.compiler;\n\nimport javax.lang.model.SourceVersion;\nimport javax.tools.DiagnosticListener;\nimport javax.tools.JavaFileObject;\nimport javax.tools.OptionChecker;\nimport javax.tools.StandardJavaFileManager;\nimport javax.tools.Tool;\n\nimport java.io.BufferedWriter;\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.UncheckedIOException;\nimport java.io.Writer;\nimport java.nio.charset.Charset;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Locale;\nimport java.util.Objects;\nimport java.util.Set;\n\n/**\n * Base class of tool executed by invoking a command-line tool.\n *\n * @author Martin Desruisseaux\n */\nclass ForkedTool implements Tool, OptionChecker {\n    /**\n     * The directory to run the compiler from, or {@code null} if none.\n     */\n    private final Path basedir;\n\n    /**\n     * The executable of the compiler to use.\n     */\n    private final String executable;\n\n    /**\n     * The file where to dump the command line, or {@code null} if none.\n     */\n    private final Path debugFilePath;\n\n    /**\n     * Whether to write the {@code target/javac.sh} file even on successful compilation.\n     */\n    private final boolean verbose;\n\n    /**\n     * Creates a new forked compiler.\n     *\n     * @param  mojo  the MOJO from which to get the configuration\n     */\n    ForkedTool(final AbstractCompilerMojo mojo) {\n        basedir = mojo.basedir;\n        executable = Objects.requireNonNull(mojo.executable);\n        debugFilePath = mojo.getDebugFilePath();\n        verbose = mojo.shouldWriteDebugFile();\n    }\n\n    /**\n     * Returns the name of this tool.\n     */\n    @Override\n    public String name() {\n        return executable;\n    }\n\n    /**\n     * Unconditionally returns -1, meaning that the given option is unsupported.\n     * This implementation actually knows nothing about which options are supported.\n     * Callers should ignore the return value.\n     *\n     * @param option ignored\n     * @return -1\n     */\n    @Override\n    public int isSupportedOption(String option) {\n        return -1;\n    }\n\n    /**\n     * Returns the source versions of the Java programming language supported by this tool.\n     * This implementation arbitrarily returns the latest supported version of current JVM.\n     * Actually, this method does not know the supported versions.\n     */\n    @Override\n    public Set<SourceVersion> getSourceVersions() {\n        return Set.of(SourceVersion.latestSupported());\n    }\n\n    /**\n     * Returns a new instance of the object holding a collection of files to compile.\n     */\n    public StandardJavaFileManager getStandardFileManager(\n            DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset encoding) {\n        return new ForkedToolSources(encoding);\n    }\n\n    /**\n     * Creates a process builder without starting the process.\n     * Callers can complete the builder configuration, then start the process.\n     */\n    private ProcessBuilder builder() {\n        var builder = new ProcessBuilder(executable);\n        if (basedir != null) {\n            builder.directory(basedir.toFile());\n        }\n        return builder;\n    }\n\n    /**\n     * Executes the command and waits for its completion.\n     *\n     * @param out where to send additional compiler output\n     * @param fileManager the dependencies (JAR files)\n     * @param options the tool options\n     * @param compilationUnits the source files to process\n     * @return whether the operation succeeded\n     * @throws IOException if an I/O error occurred when starting the process\n     */\n    final boolean run(\n            Writer out,\n            ForkedToolSources fileManager,\n            Iterable<String> options,\n            Iterable<? extends JavaFileObject> compilationUnits)\n            throws IOException {\n        ProcessBuilder builder = builder();\n        List<String> command = builder.command();\n        for (String option : options) {\n            command.add(option);\n        }\n        fileManager.addAllLocations(command);\n        for (JavaFileObject source : compilationUnits) {\n            Path path = fileManager.asPath(source);\n            if (basedir != null) {\n                try {\n                    path = basedir.relativize(path);\n                } catch (IllegalArgumentException e) {\n                    // Ignore, keep the absolute path.\n                }\n            }\n            command.add(path.toString());\n        }\n        File output = File.createTempFile(\"javac\", null);\n        try {\n            var dest = ProcessBuilder.Redirect.appendTo(output);\n            builder.redirectError(dest);\n            builder.redirectOutput(dest);\n            return start(builder, out) == 0;\n        } finally {\n            /*\n             * Need to use the native encoding because it is the encoding used by the native process.\n             * This is not necessarily the default encoding of the JVM, which is \"file.encoding\".\n             * This property is available since Java 17.\n             */\n            String cs = System.getProperty(\"native.encoding\");\n            out.append(Files.readString(output.toPath(), Charset.forName(cs)));\n            output.delete();\n        }\n    }\n\n    /**\n     * Runs the tool with the given arguments.\n     * This method is implemented as a matter of principle but should not be invoked.\n     */\n    @Override\n    public int run(InputStream in, OutputStream out, OutputStream err, String... arguments) {\n        ProcessBuilder builder = builder();\n        builder.command().addAll(Arrays.asList(arguments));\n        try {\n            return start(builder, System.err);\n        } catch (IOException e) {\n            throw new UncheckedIOException(e);\n        }\n    }\n\n    /**\n     * Starts the process and waits for its completion.\n     * If the process fails and a debug file has been specified, writes the command in that file.\n     *\n     * @param builder builder of the process to start\n     * @param out where to send additional compiler output\n     * @return the exit value of the process\n     */\n    private int start(ProcessBuilder builder, Appendable out) throws IOException {\n        Process process = builder.start();\n        int status;\n        try {\n            status = process.waitFor();\n        } catch (InterruptedException e) {\n            out.append(\"Compilation has been interrupted by \" + e).append(System.lineSeparator());\n            process.destroy();\n            status = 1;\n        }\n        if ((status != 0 || verbose) && debugFilePath != null) {\n            // Use the path separator as a way to identify the operating system.\n            final boolean windows = File.separatorChar == '\\\\';\n            String filename = debugFilePath.getFileName().toString();\n            filename = filename.substring(0, filename.lastIndexOf('.') + 1);\n            filename += windows ? \"bat\" : \"sh\";\n            boolean more = false;\n            try (BufferedWriter debugFile = Files.newBufferedWriter(debugFilePath.resolveSibling(filename))) {\n                if (basedir != null) {\n                    debugFile.write(windows ? \"chdir \" : \"cd \");\n                    debugFile.write(basedir.toString());\n                    debugFile.newLine();\n                }\n                for (String cmd : builder.command()) {\n                    if (more) {\n                        debugFile.append(' ');\n                    }\n                    debugFile.append(cmd);\n                    more = true;\n                }\n                debugFile.newLine();\n            }\n        }\n        return status;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/ForkedToolSources.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.plugin.compiler;\n\nimport javax.lang.model.element.Modifier;\nimport javax.lang.model.element.NestingKind;\nimport javax.tools.FileObject;\nimport javax.tools.JavaFileObject;\nimport javax.tools.StandardJavaFileManager;\nimport javax.tools.StandardLocation;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.Reader;\nimport java.io.UncheckedIOException;\nimport java.io.Writer;\nimport java.net.URI;\nimport java.nio.charset.Charset;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.HashMap;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.Set;\nimport java.util.StringJoiner;\nimport java.util.stream.Stream;\nimport java.util.stream.StreamSupport;\n\nimport org.apache.maven.api.JavaPathType;\nimport org.apache.maven.api.PathType;\n\n/**\n * Source files for a call to {@code javac} or {@code javadoc} command to be executed as a separated process.\n *\n * @author Martin Desruisseaux\n *\n * @see ForkedCompiler\n */\nfinal class ForkedToolSources implements StandardJavaFileManager {\n    /**\n     * Option for source files. These options are not declared in\n     * {@link JavaPathType} because they are not about dependencies.\n     */\n    private record OtherPathType(String name, String optionString, String moduleName) implements PathType {\n        /**\n         * An option for the directory of source files of a module.\n         *\n         * @param   moduleName  name of the module\n         * @return  option for the directory of source files of the specified module\n         */\n        static OtherPathType moduleSources(String moduleName) {\n            return new OtherPathType(\"MODULE_SOURCE_PATH\", \"--module-source-path\", moduleName);\n        }\n\n        /**\n         * The option for the directory of source files.\n         */\n        static final OtherPathType SOURCES = new OtherPathType(\"SOURCES\", \"--source-path\", null);\n\n        /**\n         * The option for the directory of generated sources.\n         */\n        static final OtherPathType GENERATED_SOURCES = new OtherPathType(\"GENERATED_SOURCES\", \"-s\", null);\n\n        /**\n         * The option for the directory of compiled class files.\n         */\n        static final OtherPathType OUTPUT = new OtherPathType(\"OUTPUT\", \"-d\", null);\n\n        @Override\n        public String id() {\n            return name;\n        }\n\n        @Override\n        public Optional<String> option() {\n            return Optional.of(optionString);\n        }\n\n        /**\n         * Formats the option with the paths, <em>without quotes</em>.\n         * The quotes are omitted because the paths will be given to\n         * {@link java.lang.ProcessBuilder}, not to a command-line.\n         */\n        @Override\n        public String[] option(Iterable<? extends Path> paths) {\n            String prefix = (moduleName == null) ? \"\" : (moduleName + '=');\n            var builder = new StringJoiner(File.pathSeparator, prefix, \"\");\n            paths.forEach((path) -> builder.add(path.toString()));\n            return new String[] {optionString, builder.toString()};\n        }\n    }\n\n    /**\n     * Search paths associated to locations.\n     * This map only stores verbatim the collections provided by callers.\n     *\n     * @see #setLocationFromPaths(Location, Collection)\n     * @see #getLocationAsPaths(Location)\n     */\n    private final Map<PathType, Collection<? extends Path>> locations;\n\n    /**\n     * The encoding of the files to read.\n     */\n    final Charset encoding;\n\n    /**\n     * Creates an initially empty collection of files.\n     */\n    ForkedToolSources(Charset encoding) {\n        if (encoding == null) {\n            encoding = Charset.defaultCharset();\n        }\n        this.encoding = encoding;\n        locations = new HashMap<>();\n    }\n\n    /**\n     * Unconditionally returns -1, meaning that the given option is unsupported.\n     * Required by the interface, but not used by the Maven plugin.\n     */\n    @Override\n    public int isSupportedOption(String option) {\n        return -1;\n    }\n\n    /**\n     * Nevers handle the given option.\n     */\n    @Override\n    public boolean handleOption(String current, Iterator<String> remaining) {\n        return false;\n    }\n\n    /**\n     * Returns the path to the source file represented by the given object.\n     */\n    @Override\n    public Path asPath(FileObject file) {\n        return (file instanceof Item) ? ((Item) file).path : Path.of(file.toUri());\n    }\n\n    /**\n     * Checks if the given objects represents the same canonical file.\n     * Required by the interface, but not used by the Maven plugin.\n     */\n    @Override\n    public boolean isSameFile(FileObject a, FileObject b) {\n        return asPath(a).equals(asPath(b));\n    }\n\n    /**\n     * Returns {@code JavaFileObject} instances representing the given filenames.\n     */\n    @Override\n    public Iterable<? extends JavaFileObject> getJavaFileObjects(String... names) {\n        return fromNames(Arrays.stream(names));\n    }\n\n    /**\n     * Returns {@code JavaFileObject} instances representing the given {@code File} instances.\n     */\n    @Override\n    public Iterable<? extends JavaFileObject> getJavaFileObjects(File... files) {\n        return fromFiles(Arrays.stream(files));\n    }\n\n    /**\n     * Returns {@code JavaFileObject} instances representing the given filenames.\n     */\n    @Override\n    public Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names) {\n        return fromNames(StreamSupport.stream(names.spliterator(), false));\n    }\n\n    /**\n     * Returns {@code JavaFileObject} instances representing the given {@code File} instances.\n     */\n    @Override\n    public Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files) {\n        return fromFiles(StreamSupport.stream(files.spliterator(), false));\n    }\n\n    /**\n     * Returns {@code JavaFileObject} instances representing the given {@code Path} instances.\n     */\n    @Override\n    public Iterable<? extends JavaFileObject> getJavaFileObjectsFromPaths(Collection<? extends Path> paths) {\n        return paths.stream().map(Item::new).toList();\n    }\n\n    /**\n     * Helper method for the construction of {@code JavaFileObject} instances from {@code File} instances.\n     */\n    private Iterable<? extends JavaFileObject> fromFiles(Stream<? extends File> files) {\n        return files.map((file) -> new Item(file.toPath())).toList();\n    }\n\n    /**\n     * Helper method for the construction of {@code JavaFileObject} instances from filenames.\n     */\n    private Iterable<? extends JavaFileObject> fromNames(Stream<? extends String> names) {\n        return names.map((name) -> new Item(Path.of(name))).toList();\n    }\n\n    /**\n     * A simple implementation of Java file as a wrapper around a path. This class implements some methods\n     * as a matter of principle, but those methods should not be invoked because the file will not be opened\n     * in this Java Virtual Machine. We only need a container for a {@link Path} instance.\n     */\n    private final class Item implements JavaFileObject {\n        /**\n         * Path to the source file.\n         */\n        final Path path;\n\n        /**\n         * Creates a new object for the given path to a Java source file.\n         */\n        Item(Path path) {\n            this.path = path;\n        }\n\n        /**\n         * Returns the path to the source file.\n         */\n        @Override\n        public String getName() {\n            return path.toString();\n        }\n\n        /**\n         * Returns the path to the source file.\n         */\n        @Override\n        public String toString() {\n            return getName();\n        }\n\n        /**\n         * Returns the path as an URI.\n         */\n        @Override\n        public URI toUri() {\n            return path.toUri();\n        }\n\n        /**\n         * Returns whether the file is a source, a class or other kind of object.\n         */\n        @Override\n        public Kind getKind() {\n            String filename = path.getFileName().toString();\n            for (Kind k : Kind.values()) {\n                if (filename.endsWith(k.extension)) {\n                    return k;\n                }\n            }\n            return Kind.OTHER;\n        }\n\n        /**\n         * Returns whether this object is compatible with the given non-qualified name and the given type.\n         */\n        @Override\n        public boolean isNameCompatible(String simpleName, Kind kind) {\n            return path.getFileName().toString().equals(simpleName.concat(kind.extension));\n        }\n\n        /**\n         * Returns {@code null}, meaning that this object as no information about nesting kind.\n         */\n        @Override\n        public NestingKind getNestingKind() {\n            return null;\n        }\n\n        /**\n         * Returns {@code null}, meaning that this object as no information about access level.\n         */\n        @Override\n        public Modifier getAccessLevel() {\n            return null;\n        }\n\n        /**\n         * Returns the time this file object was last modified.\n         */\n        @Override\n        public long getLastModified() {\n            try {\n                return Files.getLastModifiedTime(path).toMillis();\n            } catch (IOException e) {\n                throw new UncheckedIOException(e);\n            }\n        }\n\n        /**\n         * Deletes the source file if it exists.\n         */\n        @Override\n        public boolean delete() {\n            try {\n                return Files.deleteIfExists(path);\n            } catch (IOException e) {\n                throw new UncheckedIOException(e);\n            }\n        }\n\n        /**\n         * Opens the file an an input stream.\n         * Implemented as a matter of principle, but should not be invoked.\n         */\n        @Override\n        public InputStream openInputStream() throws IOException {\n            return Files.newInputStream(path);\n        }\n\n        /**\n         * Opens the file an an output stream.\n         * Implemented as a matter of principle, but should not be invoked.\n         */\n        @Override\n        public OutputStream openOutputStream() throws IOException {\n            return Files.newOutputStream(path);\n        }\n\n        /**\n         * Opens the file a character reader.\n         * Implemented as a matter of principle, but should not be invoked.\n         */\n        @Override\n        public Reader openReader(boolean ignoreEncodingErrors) throws IOException {\n            return Files.newBufferedReader(path, encoding);\n        }\n\n        /**\n         * Returns the file content.\n         * Implemented as a matter of principle, but should not be invoked.\n         */\n        @Override\n        public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {\n            return Files.readString(path, encoding);\n        }\n\n        /**\n         * Opens the file a character writer.\n         * Implemented as a matter of principle, but should not be invoked.\n         */\n        @Override\n        public Writer openWriter() throws IOException {\n            return Files.newBufferedWriter(path, encoding);\n        }\n    }\n\n    /**\n     * Converts the {@code File} instances to {@code Path} instances and delegate.\n     * This is defined as a matter of principle but is not used by the Maven compiler plugin.\n     *\n     * @see #setLocationFromPaths(Location, Collection)\n     */\n    @Override\n    public void setLocation(Location location, Iterable<? extends File> files) {\n        List<Path> paths = null;\n        if (files != null) {\n            paths = StreamSupport.stream(files.spliterator(), false)\n                    .map(File::toPath)\n                    .toList();\n        }\n        setLocationFromPaths(location, paths);\n    }\n\n    /**\n     * Converts the {@code Path} instances to {@code file} instances for the given location.\n     * This is defined as a matter of principle but is not used by the Maven compiler plugin.\n     *\n     * @see #setLocationFromPaths(Location, Collection)\n     */\n    @Override\n    public Iterable<? extends File> getLocation(Location location) {\n        var paths = getLocationAsPaths(location);\n        if (paths != null) {\n            return paths.stream().map(Path::toFile).toList();\n        }\n        return null;\n    }\n\n    /**\n     * Associates the given search paths with the given location.\n     * The location may identify the class-path, module-path, doclet-path, etc.\n     * Any previous value will be discarded.\n     */\n    @Override\n    public void setLocationFromPaths(Location location, Collection<? extends Path> paths) {\n        PathType type = JavaPathType.valueOf(location).orElse(null);\n        if (type == null) {\n            if (location == StandardLocation.SOURCE_OUTPUT) {\n                type = OtherPathType.GENERATED_SOURCES;\n            } else if (location == StandardLocation.SOURCE_PATH) {\n                type = OtherPathType.SOURCES;\n            } else if (location == StandardLocation.CLASS_OUTPUT) {\n                type = OtherPathType.OUTPUT;\n            } else {\n                throw new IllegalArgumentException(\"Unsupported location: \" + location);\n            }\n        }\n        if (isAbsent(paths)) {\n            locations.remove(type);\n        } else {\n            locations.put(type, paths);\n        }\n    }\n\n    /**\n     * Associates the given search paths for a module with the given location.\n     * Any previous value will be discarded.\n     */\n    @Override\n    public void setLocationForModule(Location location, String moduleName, Collection<? extends Path> paths)\n            throws IOException {\n        PathType type;\n        if (location == StandardLocation.PATCH_MODULE_PATH) {\n            type = JavaPathType.patchModule(moduleName);\n        } else if (location == StandardLocation.MODULE_SOURCE_PATH) {\n            type = OtherPathType.moduleSources(moduleName);\n        } else {\n            throw new IllegalArgumentException(\"Unsupported location: \" + location);\n        }\n        if (isAbsent(paths)) {\n            locations.remove(type);\n        } else {\n            locations.put(type, paths);\n        }\n    }\n\n    /**\n     * Returns whether the given collection is null or empty.\n     */\n    private static boolean isAbsent(Collection<?> c) {\n        return (c == null) || c.isEmpty();\n    }\n\n    /**\n     * Returns the search path associated with the given location, or {@code null} if none.\n     */\n    @Override\n    public Collection<? extends Path> getLocationAsPaths(Location location) {\n        return locations.get(JavaPathType.valueOf(location).orElse(null));\n    }\n\n    /**\n     * Returns whether a location is known to this file manager.\n     * This is defined as a matter of principle but is not used by the Maven compiler plugin.\n     */\n    @Override\n    public boolean hasLocation(Location location) {\n        return getLocationAsPaths(location) != null;\n    }\n\n    /**\n     * Adds class-path, module-path and other paths to the given command.\n     *\n     * @param command the list where to add the options\n     */\n    void addAllLocations(List<String> command) {\n        for (Map.Entry<PathType, Collection<? extends Path>> entry : locations.entrySet()) {\n            command.addAll(Arrays.asList(entry.getKey().option(entry.getValue())));\n        }\n    }\n\n    /**\n     * Not yet implemented (not needed for forked tools).\n     */\n    @Override\n    public Iterable<JavaFileObject> list(\n            Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException {\n        throw new UnsupportedOperationException(\"Not supported yet.\");\n    }\n\n    /**\n     * Not yet implemented (not needed for forked tools).\n     */\n    @Override\n    public String inferBinaryName(Location location, JavaFileObject file) {\n        throw new UnsupportedOperationException(\"Not supported yet.\");\n    }\n\n    /**\n     * Not yet implemented (not needed for forked tools).\n     */\n    @Override\n    public JavaFileObject getJavaFileForInput(Location location, String className, JavaFileObject.Kind kind)\n            throws IOException {\n        throw new UnsupportedOperationException(\"Not supported yet.\");\n    }\n\n    /**\n     * Not yet implemented (not needed for forked tools).\n     */\n    @Override\n    public JavaFileObject getJavaFileForOutput(\n            Location location, String className, JavaFileObject.Kind kind, FileObject sibling) throws IOException {\n        throw new UnsupportedOperationException(\"Not supported yet.\");\n    }\n\n    /**\n     * Not yet implemented (not needed for forked tools).\n     */\n    @Override\n    public FileObject getFileForInput(Location location, String packageName, String relativeName) throws IOException {\n        throw new UnsupportedOperationException(\"Not supported yet.\");\n    }\n\n    /**\n     * Not yet implemented (not needed for forked tools).\n     */\n    @Override\n    public FileObject getFileForOutput(Location location, String packageName, String relativeName, FileObject sibling)\n            throws IOException {\n        throw new UnsupportedOperationException(\"Not supported yet.\");\n    }\n\n    /**\n     * Returns a class loader for loading plug-ins, or {@code null} if disabled.\n     */\n    @Override\n    public ClassLoader getClassLoader(Location location) {\n        return null;\n    }\n\n    /**\n     * Flushes any resources opened for output by this file manager.\n     */\n    @Override\n    public void flush() {}\n\n    /**\n     * Releases any resources opened by this file manager.\n     */\n    @Override\n    public void close() {\n        locations.clear();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/IncrementalBuild.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.plugin.compiler;\n\nimport java.io.BufferedInputStream;\nimport java.io.BufferedOutputStream;\nimport java.io.DataInputStream;\nimport java.io.DataOutputStream;\nimport java.io.IOException;\nimport java.io.UncheckedIOException;\nimport java.nio.file.Files;\nimport java.nio.file.LinkOption;\nimport java.nio.file.NoSuchFileException;\nimport java.nio.file.Path;\nimport java.nio.file.StandardOpenOption;\nimport java.nio.file.attribute.FileTime;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.EnumSet;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Locale;\nimport java.util.Map;\nimport java.util.Objects;\nimport java.util.Set;\nimport java.util.stream.Stream;\n\nimport org.apache.maven.api.plugin.MojoException;\n\n/**\n * Helper methods to support incremental builds.\n */\nfinal class IncrementalBuild {\n    /**\n     * Elements to take in consideration when deciding whether to recompile a file.\n     *\n     * @see AbstractCompilerMojo#incrementalCompilation\n     */\n    enum Aspect {\n        /**\n         * Recompile all source files if the compiler options changed.\n         * Changes are detected on a <i>best-effort</i> basis only.\n         */\n        OPTIONS(Set.of()),\n\n        /**\n         * Recompile all source files if at least one dependency (JAR file) changed since the last build.\n         * This check is based on the last modification times of JAR files.\n         *\n         * <h4>Implementation note</h4>\n         * The checks use information about the previous build saved in {@code target/…/*.cache} files.\n         * Deleting those files cause a recompilation of all sources.\n         */\n        DEPENDENCIES(Set.of()),\n\n        /**\n         * Recompile source files modified since the last build.\n         * In addition, if a source file has been deleted, then all source files are recompiled.\n         * This check is based on the last modification times of source files,\n         * not on the existence or modification times of the {@code *.class} files.\n         *\n         * <p>It is usually not needed to specify both {@code SOURCES} and {@link #CLASSES}.\n         * But doing so is not forbidden.</p>\n         *\n         * <h4>Implementation note</h4>\n         * The checks use information about the previous build saved in {@code target/…/*.cache} files.\n         * Deleting those files cause a recompilation of all sources.\n         */\n        SOURCES(Set.of()),\n\n        /**\n         * Recompile source files ({@code *.java}) associated to no output file ({@code *.class})\n         * or associated to an output file older than the source. This algorithm does not check\n         * if a source file has been removed, potentially leaving non-recompiled classes with\n         * references to classes that no longer exist.\n         *\n         * <p>It is usually not needed to specify both {@link #SOURCES} and {@code CLASSES}.\n         * But doing so is not forbidden.</p>\n         *\n         * <h4>Implementation note</h4>\n         * This check does not use or generate any {@code *.cache} file.\n         */\n        CLASSES(Set.of()),\n\n        /**\n         * Recompile modules and let the compiler decides which individual files to recompile.\n         * The compiler plugin does not enumerate the source files to recompile (actually, it does not scan at all the\n         * source directories). Instead, it only specifies the module to recompile using the {@code --module} option.\n         * The Java compiler will scan the source directories itself and compile only those source files that are newer\n         * than the corresponding files in the output directory.\n         *\n         * <p>This option is available only at the following conditions:</p>\n         * <ul>\n         *   <li>All sources of the project to compile are modules in the Java sense.</li>\n         *   <li>{@link #SOURCES}, {@link #CLASSES}, {@link #REBUILD_ON_ADD} and  {@link #REBUILD_ON_CHANGE}\n         *       aspects are not used.</li>\n         *   <li>There is no include/exclude filter.</li>\n         * </ul>\n         */\n        MODULES(Set.of(SOURCES, CLASSES)),\n\n        /**\n         * Modifier for recompiling all source files when the addition of a new file is detected.\n         * This flag is effective only when used together with {@link #SOURCES} or {@link #CLASSES}.\n         * When used with {@link #CLASSES}, it provides a way to detect class renaming\n         * (this is not needed with {@link #SOURCES} for detecting renaming).\n         */\n        REBUILD_ON_ADD(Set.of(MODULES)),\n\n        /**\n         * Modifier for recompiling all source files when a change is detected in at least one source file.\n         * This flag is effective only when used together with {@link #SOURCES} or {@link #CLASSES}.\n         * It does not rebuild when a new source file is added without change in other files,\n         * unless {@link #REBUILD_ON_ADD} is also specified.\n         */\n        REBUILD_ON_CHANGE(REBUILD_ON_ADD.excludes),\n\n        /**\n         * The compiler plugin unconditionally specifies all sources to the Java compiler.\n         * This aspect is mutually exclusive with all other aspects.\n         */\n        NONE(Set.of(OPTIONS, DEPENDENCIES, SOURCES, CLASSES, REBUILD_ON_ADD, REBUILD_ON_CHANGE, MODULES));\n\n        /**\n         * If this aspect is mutually exclusive with other aspects, the excluded aspects.\n         */\n        private final Set<Aspect> excludes;\n\n        /**\n         * Creates a new enumeration value.\n         *\n         * @param excludes the aspects that are mutually exclusive with this aspect\n         */\n        Aspect(Set<Aspect> excludes) {\n            this.excludes = excludes;\n        }\n\n        /**\n         * Returns the name in lower-case, for producing error message.\n         */\n        @Override\n        public String toString() {\n            return name().toLowerCase(Locale.US);\n        }\n\n        /**\n         * Parses a comma-separated list of aspects.\n         *\n         * @param values the plugin parameter to parse as a comma-separated list\n         * @return the aspects which, when modified, should cause a partial or full rebuild\n         * @throws MojoException if a value is not recognized, or if mutually exclusive values are specified\n         */\n        static EnumSet<Aspect> parse(final String values) {\n            var aspects = EnumSet.noneOf(Aspect.class);\n            for (String value : values.split(\",\")) {\n                value = value.trim();\n                try {\n                    aspects.add(valueOf(value.toUpperCase(Locale.US).replace('-', '_')));\n                } catch (IllegalArgumentException e) {\n                    var sb = new StringBuilder(256)\n                            .append(\"Illegal incremental build setting: \\\"\")\n                            .append(value);\n                    String s = \"\\\". Valid values are \";\n                    for (Aspect aspect : values()) {\n                        sb.append(s).append(aspect);\n                        s = \", \";\n                    }\n                    throw new CompilationFailureException(sb.append('.').toString(), e);\n                }\n            }\n            for (Aspect aspect : aspects) {\n                for (Aspect exclude : aspect.excludes) {\n                    if (aspects.contains(exclude)) {\n                        throw new CompilationFailureException(\"Illegal incremental build setting: \\\"\" + aspect\n                                + \"\\\" and \\\"\" + exclude + \"\\\" are mutually exclusive.\");\n                    }\n                }\n            }\n            if (aspects.isEmpty()) {\n                throw new CompilationFailureException(\"Incremental build setting cannot be empty.\");\n            }\n            return aspects;\n        }\n    }\n\n    /**\n     * The options for following links. An empty array means that links will be followed.\n     */\n    private static final LinkOption[] LINK_OPTIONS = new LinkOption[0];\n\n    /**\n     * Magic number, generated randomly, to store in the header of the binary file.\n     * This number shall be changed every times that the binary file format is modified.\n     * The file format is described in {@link #writeCache()}.\n     *\n     * @see #writeCache()\n     */\n    private static final long MAGIC_NUMBER = -8163803035240576921L;\n\n    /**\n     * Flags in the binary output file telling whether the source and/or target directory changed.\n     * Those flags are stored as a byte before each entry. They can be combined as bit mask.\n     * Those flags are for compressing the binary file, not for detecting if something changed\n     * since the last build.\n     */\n    private static final byte NEW_SOURCE_DIRECTORY = 1, NEW_TARGET_DIRECTORY = 2;\n\n    /**\n     * Flag in the binary output file indicating that the output file of a source is different\n     * from the one inferred by heuristic rules. For performance reasons, we store the output\n     * file explicitly only when it cannot be inferred.\n     *\n     * @see javax.tools.JavaFileManager#getFileForOutput\n     */\n    private static final byte EXPLICIT_OUTPUT_FILE = 4;\n\n    /**\n     * Flag in the binary output file telling that the output file has been omitted.\n     * This is the case of {@code package-info.class} files when the result is empty.\n     */\n    private static final byte OMITTED_OUTPUT_FILE = 8;\n\n    /**\n     * Bitmask of all flags that are allowed in a cache file.\n     */\n    private static final byte ALL_FLAGS =\n            NEW_SOURCE_DIRECTORY | NEW_TARGET_DIRECTORY | EXPLICIT_OUTPUT_FILE | OMITTED_OUTPUT_FILE;\n\n    /**\n     * Name of the file where to store the list of source files and the list of files created by the compiler.\n     * This is a binary format used for detecting changes. The file is stored in the {@code target} directory.\n     * If the file is absent of corrupted, it will be ignored and recreated.\n     *\n     * @see AbstractCompilerMojo#mojoStatusPath\n     */\n    private final Path cacheFile;\n\n    /**\n     * Whether the cache file has been loaded.\n     */\n    private boolean cacheLoaded;\n\n    /**\n     * All source files together with their last modification time.\n     * This list is specified at construction time and is not modified by this class.\n     *\n     * @see #getModifiedSources()\n     */\n    private final List<SourceFile> sourceFiles;\n\n    /**\n     * The build time in milliseconds since January 1st, 1970.\n     * This is used for detecting if a dependency changed since the previous build.\n     */\n    private final long buildTime;\n\n    /**\n     * Time of the previous build. This value is initialized by {@link #loadCache()}.\n     * If the cache cannot be loaded, then this field is conservatively set to the same value\n     * as {@link #buildTime}, but it shouldn't matter because a full build will be done anyway.\n     */\n    private long previousBuildTime;\n\n    /**\n     * The granularity in milliseconds to use for comparing modification times.\n     *\n     * @see AbstractCompilerMojo#staleMillis\n     */\n    private final long staleMillis;\n\n    /**\n     * Hash code value of the compiler options during the previous build.\n     * This value is initialized by {@link #loadCache()}.\n     */\n    private int previousOptionsHash;\n\n    /**\n     * Hash code value of the current {@link Options#options} list.\n     */\n    private final int optionsHash;\n\n    /**\n     * Whether to save the list of source files.\n     */\n    private final boolean saveSourceList;\n\n    /**\n     * Whether to recompile all source files if a file addition is detected.\n     *\n     * @see Aspect#REBUILD_ON_ADD\n     */\n    private final boolean rebuildOnAdd;\n\n    /**\n     * Whether to recompile all source files if at least one source changed.\n     *\n     * @see Aspect#REBUILD_ON_CHANGE\n     */\n    private final boolean rebuildOnChange;\n\n    /**\n     * Whether to provide more details about why a module is rebuilt.\n     */\n    private final boolean showCompilationChanges;\n\n    /**\n     * Creates a new helper for an incremental build.\n     *\n     * @param mojo the MOJO which is compiling source code\n     * @param sourceFiles all source files\n     * @param saveSourceList whether to save the list of source files in the cache\n     * @param configuration the compiler options\n     * @param aspects result of {@link Aspect#parse(String)}\n     * @throws IOException if the parent directory cannot be created\n     */\n    IncrementalBuild(\n            AbstractCompilerMojo mojo,\n            List<SourceFile> sourceFiles,\n            boolean saveSourceList,\n            Options configuration,\n            EnumSet<Aspect> aspects)\n            throws IOException {\n        this.sourceFiles = sourceFiles;\n        this.saveSourceList = saveSourceList;\n        cacheFile = mojo.mojoStatusPath;\n        if (cacheFile != null) {\n            // Should never be null, but it has been observed to happen with some Maven versions.\n            Files.createDirectories(cacheFile.getParent());\n        }\n        showCompilationChanges = mojo.showCompilationChanges;\n        buildTime = System.currentTimeMillis();\n        previousBuildTime = buildTime;\n        staleMillis = mojo.staleMillis;\n        rebuildOnAdd = aspects.contains(Aspect.REBUILD_ON_ADD);\n        rebuildOnChange = aspects.contains(Aspect.REBUILD_ON_CHANGE);\n        optionsHash = configuration.options.hashCode();\n    }\n\n    /**\n     * Deletes the cache if it exists.\n     *\n     * @throws IOException if an error occurred while deleting the file\n     */\n    public void deleteCache() throws IOException {\n        if (cacheFile != null) {\n            // Should never be null, but it has been observed to happen with some Maven versions.\n            Files.deleteIfExists(cacheFile);\n        }\n    }\n\n    /**\n     * Saves the list of source files in the cache file. The cache is a binary file\n     * and its format may change in any future version. The current format is as below:\n     *\n     * <ul>\n     *   <li>The magic number (while change when the format changes).</li>\n     *   <li>The build time in milliseconds since January 1st, 1970.</li>\n     *   <li>Hash code value of the {@link Options#options} list.</li>\n     *   <li>Number of source files, or 0 if {@code sources} is {@code false}.</li>\n     *   <li>If {@code sources} is {@code true}, then for each source file:<ul>\n     *     <li>A bit mask of {@link #NEW_SOURCE_DIRECTORY}, {@link #NEW_TARGET_DIRECTORY} and {@link #EXPLICIT_OUTPUT_FILE}.</li>\n     *     <li>If {@link #NEW_SOURCE_DIRECTORY} is set, the new root directory of source files.</li>\n     *     <li>If {@link #NEW_TARGET_DIRECTORY} is set, the new root directory of output files.</li>\n     *     <li>If {@link #EXPLICIT_OUTPUT_FILE} is set, the output file.</li>\n     *     <li>The file path as a sibling of the previous file, unless a new root directory has been specified.</li>\n     *     <li>Last modification time of the source file, in milliseconds since January 1st.</li>\n     *   </ul></li>\n     * </ul>\n     *\n     * The \"new source directory\" flag is to avoid repeating the parent directory.\n     * If that flag is {@code false}, then only the filename is stored and the parent\n     * is the same as the previous file.\n     *\n     * @throws IOException if an error occurred while writing the cache file\n     */\n    @SuppressWarnings({\"checkstyle:InnerAssignment\", \"checkstyle:NeedBraces\"})\n    public void writeCache() throws IOException {\n        if (cacheFile == null) {\n            // Should never be null, but it has been observed to happen with some Maven versions.\n            return;\n        }\n        try (DataOutputStream out = new DataOutputStream(new BufferedOutputStream(Files.newOutputStream(\n                cacheFile,\n                StandardOpenOption.WRITE,\n                StandardOpenOption.CREATE,\n                StandardOpenOption.TRUNCATE_EXISTING)))) {\n            out.writeLong(MAGIC_NUMBER);\n            out.writeLong(buildTime);\n            out.writeInt(optionsHash);\n            out.writeInt(saveSourceList ? sourceFiles.size() : 0);\n            if (saveSourceList) {\n                Path srcDir = null;\n                Path tgtDir = null;\n                Path previousParent = null;\n                for (SourceFile source : sourceFiles) {\n                    final Path sourceFile = source.file;\n                    final Path outputFile = source.getOutputFile();\n                    boolean sameSrcDir = Objects.equals(srcDir, srcDir = source.directory.root);\n                    boolean sameTgtDir = Objects.equals(tgtDir, tgtDir = source.directory.getOutputDirectory());\n                    boolean sameOutput = source.isStandardOutputFile();\n                    boolean omitted = Files.notExists(outputFile);\n                    out.writeByte((sameSrcDir ? 0 : NEW_SOURCE_DIRECTORY)\n                            | (sameTgtDir ? 0 : NEW_TARGET_DIRECTORY)\n                            | (sameOutput ? 0 : EXPLICIT_OUTPUT_FILE)\n                            | (omitted ? OMITTED_OUTPUT_FILE : 0));\n\n                    if (!sameSrcDir) out.writeUTF((previousParent = srcDir).toString());\n                    if (!sameTgtDir) out.writeUTF(tgtDir.toString());\n                    if (!sameOutput) out.writeUTF(outputFile.toString());\n                    out.writeUTF(previousParent.relativize(sourceFile).toString());\n                    out.writeLong(source.lastModified);\n                    previousParent = sourceFile.getParent();\n                }\n            }\n        }\n    }\n\n    /**\n     * Loads the list of source files and their modification times from the previous build.\n     * The binary file format reads by this method is described in {@link #writeCache()}.\n     * The keys are the source files. The returned map is modifiable.\n     *\n     * @return the source files of previous build\n     * @throws IOException if an error occurred while reading the cache file\n     */\n    @SuppressWarnings(\"checkstyle:NeedBraces\")\n    private Map<Path, SourceInfo> loadCache() throws IOException {\n        if (cacheFile == null) {\n            // Should never be null, but it has been observed to happen with some Maven versions.\n            return Collections.emptyMap(); // Not `Map.of()` because we need to allow `Map.remove(…)`.\n        }\n        final Map<Path, SourceInfo> previousBuild;\n        try (DataInputStream in = new DataInputStream(\n                new BufferedInputStream(Files.newInputStream(cacheFile, StandardOpenOption.READ)))) {\n            if (in.readLong() != MAGIC_NUMBER) {\n                throw new IOException(\"Invalid cache file.\");\n            }\n            previousBuildTime = in.readLong();\n            previousOptionsHash = in.readInt();\n            int remaining = in.readInt();\n            previousBuild = new HashMap<>(remaining + remaining / 3);\n            Path srcDir = null;\n            Path tgtDir = null;\n            Path srcFile = null;\n            while (--remaining >= 0) {\n                final byte flags = in.readByte();\n                if ((flags & ~ALL_FLAGS) != 0) {\n                    throw new IOException(\"Invalid cache file.\");\n                }\n                boolean newSrcDir = (flags & NEW_SOURCE_DIRECTORY) != 0;\n                boolean newTgtDir = (flags & NEW_TARGET_DIRECTORY) != 0;\n                boolean newOutput = (flags & EXPLICIT_OUTPUT_FILE) != 0;\n                boolean omitted = (flags & OMITTED_OUTPUT_FILE) != 0;\n                Path output = null;\n                if (newSrcDir) srcDir = Path.of(in.readUTF());\n                if (newTgtDir) tgtDir = Path.of(in.readUTF());\n                if (newOutput) output = Path.of(in.readUTF());\n                String path = in.readUTF();\n                srcFile = newSrcDir ? srcDir.resolve(path) : srcFile.resolveSibling(path);\n                srcFile = srcFile.normalize();\n                var info = new SourceInfo(srcDir, tgtDir, output, omitted, in.readLong());\n                if (previousBuild.put(srcFile, info) != null) {\n                    throw new IOException(\"Duplicated source file declared in the cache: \" + srcFile);\n                }\n            }\n        }\n        cacheLoaded = true;\n        return previousBuild;\n    }\n\n    /**\n     * Information about a source file from a previous build.\n     *\n     * @param sourceDirectory root directory of the source file\n     * @param outputDirectory output directory of the compiled file\n     * @param outputFile the output file if it was explicitly specified, or {@code null} if it can be inferred\n     * @param omitted whether the output file has not been generated by the compiler (e.g. {@code package-info.class})\n     * @param lastModified last modification time of the source file during the previous build\n     */\n    private record SourceInfo(\n            Path sourceDirectory, Path outputDirectory, Path outputFile, boolean omitted, long lastModified) {\n        /**\n         * Deletes all output files associated to the given source file. If the output file is a {@code .class} file,\n         * then this method deletes also the output files for all inner classes (e.g. {@code \"Foo$0.class\"}).\n         *\n         * @param sourceFile the source file for which to delete output files\n         * @throws IOException if an error occurred while scanning the output directory or deleting a file\n         */\n        void deleteClassFiles(final Path sourceFile) throws IOException {\n            Path output = outputFile;\n            if (output == null) {\n                output = SourceFile.toOutputFile(\n                        sourceDirectory,\n                        outputDirectory,\n                        sourceFile,\n                        SourceDirectory.JAVA_FILE_SUFFIX,\n                        SourceDirectory.CLASS_FILE_SUFFIX);\n            }\n            String filename = output.getFileName().toString();\n            if (filename.endsWith(SourceDirectory.CLASS_FILE_SUFFIX)) {\n                String prefix = filename.substring(0, filename.length() - SourceDirectory.CLASS_FILE_SUFFIX.length());\n                List<Path> outputs;\n                try (Stream<Path> files = Files.walk(output.getParent(), 1)) {\n                    outputs = files.filter((f) -> {\n                                String name = f.getFileName().toString();\n                                return name.startsWith(prefix)\n                                        && name.endsWith(SourceDirectory.CLASS_FILE_SUFFIX)\n                                        && (name.equals(filename) || name.charAt(prefix.length()) == '$');\n                            })\n                            .toList();\n                }\n                for (Path p : outputs) {\n                    Files.delete(p);\n                }\n            } else {\n                Files.deleteIfExists(output);\n            }\n        }\n    }\n\n    /**\n     * Detects whether the list of detected files has changed since the last build.\n     * This method loads the list of files of the previous build from a status file\n     * and compares it with the new list file. If the list file cannot be read,\n     * then this method conservatively assumes that the file tree changed.\n     *\n     * <p>If this method returns {@code null}, the caller can check the {@link SourceFile#isNewOrModified} flag\n     * for deciding which files to recompile. If this method returns non-null value, then the {@code isModified}\n     * flag should be ignored and all files recompiled unconditionally. The returned non-null value is a message\n     * saying why the project needs to be rebuilt.</p>\n     *\n     * @return {@code null} if the project does not need to be rebuilt, otherwise a message saying why to rebuild\n     * @throws IOException if an error occurred while deleting output files of the previous build\n     *\n     * @see Aspect#SOURCES\n     */\n    String inputFileTreeChanges() throws IOException {\n        final Map<Path, SourceInfo> previousBuild;\n        try {\n            previousBuild = loadCache();\n        } catch (NoSuchFileException e) {\n            return \"Compiling all files.\";\n        } catch (IOException e) {\n            return causeOfRebuild(\"information about the previous build cannot be read\", true)\n                    .append(System.lineSeparator())\n                    .append(e)\n                    .toString();\n        }\n        boolean rebuild = false;\n        boolean allChanged = true;\n        final var added = new ArrayList<Path>();\n        for (SourceFile source : sourceFiles) {\n            SourceInfo previous = previousBuild.remove(source.file);\n            if (previous != null) {\n                if (source.lastModified - previous.lastModified <= staleMillis) {\n                    /*\n                     * Source file has not been modified. But we still need to check if the output file exists.\n                     * It may be, for example, because the compilation failed during the previous build because\n                     * of another class.\n                     */\n                    allChanged = false;\n                    if (previous.omitted) {\n                        continue;\n                    }\n                    Path output = source.getOutputFile();\n                    if (Files.exists(output, LINK_OPTIONS)) {\n                        continue; // Source file has not been modified and output file exists.\n                    }\n                } else if (rebuildOnChange) {\n                    return causeOfRebuild(\"at least one source file changed\", false)\n                            .toString();\n                }\n            } else if (!source.ignoreModification) {\n                if (showCompilationChanges) {\n                    added.add(source.file);\n                }\n                rebuild |= rebuildOnAdd;\n            }\n            source.isNewOrModified = true;\n        }\n        /*\n         * The files remaining in `previousBuild` are files that have been removed since the last build.\n         * If no file has been removed, then there is no need to rebuild the whole project (added files\n         * do not require a full build).\n         */\n        if (previousBuild.isEmpty()) {\n            if (allChanged) {\n                return causeOfRebuild(\"all source files changed\", false).toString();\n            }\n            if (!rebuild) {\n                return null;\n            }\n        }\n        /*\n         * If some files have been removed, we need to delete the corresponding output files.\n         * If the output file extension is \".class\", then many files may be deleted because\n         * the output file may be accompanied by inner classes (e.g. {@code \"Foo$0.class\"}).\n         */\n        for (Map.Entry<Path, SourceInfo> removed : previousBuild.entrySet()) {\n            removed.getValue().deleteClassFiles(removed.getKey());\n        }\n        /*\n         * At this point, it has been decided that all source files will be recompiled.\n         * Format a message saying why.\n         */\n        StringBuilder causeOfRebuild = causeOfRebuild(\"of added or removed source files\", showCompilationChanges);\n        if (showCompilationChanges) {\n            for (Path fileAdded : added) {\n                causeOfRebuild.append(System.lineSeparator()).append(\"  + \").append(fileAdded);\n            }\n            for (Path fileRemoved : previousBuild.keySet()) {\n                causeOfRebuild.append(System.lineSeparator()).append(\"  - \").append(fileRemoved);\n            }\n        }\n        return causeOfRebuild.toString();\n    }\n\n    /**\n     * Returns whether at least one dependency file is more recent than the given build start time.\n     * This method should be invoked only after {@link #inputFileTreeChanges} returned {@code null}.\n     * Each given root can be either a regular file (typically a JAR file) or a directory.\n     * Directories are scanned recursively.\n     *\n     * @param dependencies files or directories to scan\n     * @param fileExtensions extensions of the file to check (usually \"jar\" and \"class\")\n     * @return {@code null} if the project does not need to be rebuilt, otherwise a message saying why to rebuild\n     * @throws IOException if an error occurred while scanning the directories\n     *\n     * @see Aspect#DEPENDENCIES\n     */\n    String dependencyChanges(Iterable<Collection<Path>> dependencies, Collection<String> fileExtensions)\n            throws IOException {\n        if (!cacheLoaded) {\n            loadCache();\n        }\n        final FileTime changeTime = FileTime.fromMillis(previousBuildTime);\n        final var updated = new ArrayList<Path>();\n        for (Collection<Path> roots : dependencies) {\n            for (Path root : roots) {\n                try (Stream<Path> files = Files.walk(root)) {\n                    files.filter((f) -> {\n                                String name = f.getFileName().toString();\n                                int s = name.lastIndexOf('.');\n                                if (s < 0 || !fileExtensions.contains(name.substring(s + 1))) {\n                                    return false;\n                                }\n                                try {\n                                    return Files.isRegularFile(f)\n                                            && Files.getLastModifiedTime(f).compareTo(changeTime) >= 0;\n                                } catch (IOException e) {\n                                    throw new UncheckedIOException(e);\n                                }\n                            })\n                            .forEach(updated::add);\n                } catch (UncheckedIOException e) {\n                    throw e.getCause();\n                }\n            }\n        }\n        if (updated.isEmpty()) {\n            return null;\n        }\n        StringBuilder causeOfRebuild = causeOfRebuild(\"some dependencies changed\", showCompilationChanges);\n        if (showCompilationChanges) {\n            for (Path file : updated) {\n                causeOfRebuild.append(System.lineSeparator()).append(\"    \").append(file);\n            }\n        }\n        return causeOfRebuild.toString();\n    }\n\n    /**\n     * Returns whether the compiler options have changed.\n     * This method should be invoked only after {@link #inputFileTreeChanges} returned {@code null}.\n     *\n     * @return {@code null} if the project does not need to be rebuilt, otherwise a message saying why to rebuild\n     * @throws IOException if an error occurred while loading the cache file\n     *\n     * @see Aspect#OPTIONS\n     */\n    String optionChanges() throws IOException {\n        if (!cacheLoaded) {\n            loadCache();\n        }\n        if (optionsHash == previousOptionsHash) {\n            return null;\n        }\n        return causeOfRebuild(\"of changes in compiler options\", false).toString();\n    }\n\n    /**\n     * Prepares a message saying why a full rebuild is done. A colon character will be added\n     * if showing compilation changes is enabled, otherwise a period is added.\n     *\n     * @param cause the cause of the rebuild, without trailing colon or period\n     * @param colon whether to append a colon instead of a period after the message\n     * @return a buffer where more details can be appended for reporting the cause\n     */\n    private static StringBuilder causeOfRebuild(String cause, boolean colon) {\n        return new StringBuilder(128)\n                .append(\"Recompiling all files because \")\n                .append(cause)\n                .append(colon ? ':' : '.');\n    }\n\n    /**\n     * Compares the modification time of all source files with the modification time of output files.\n     * The files identified as in need to be recompiled have their {@link SourceFile#isNewOrModified}\n     * flag set to {@code true}. This method does not use the cache file.\n     *\n     * @return {@code null} if the project does not need to be rebuilt, otherwise a message saying why to rebuild\n     * @throws IOException if an error occurred while reading the time stamp of an output file\n     *\n     * @see Aspect#CLASSES\n     */\n    String markNewOrModifiedSources() throws IOException {\n        for (SourceFile source : sourceFiles) {\n            if (!source.isNewOrModified) {\n                // Check even if `source.ignoreModification` is true.\n                Path output = source.getOutputFile();\n                if (Files.exists(output, LINK_OPTIONS)) {\n                    FileTime t = Files.getLastModifiedTime(output, LINK_OPTIONS);\n                    if (source.lastModified - t.toMillis() <= staleMillis) {\n                        continue;\n                    } else if (rebuildOnChange) {\n                        return causeOfRebuild(\"at least one source file changed\", false)\n                                .toString();\n                    }\n                } else if (rebuildOnAdd) {\n                    StringBuilder causeOfRebuild = causeOfRebuild(\"of added source files\", showCompilationChanges);\n                    if (showCompilationChanges) {\n                        causeOfRebuild\n                                .append(System.lineSeparator())\n                                .append(\"  + \")\n                                .append(source.file);\n                    }\n                    return causeOfRebuild.toString();\n                }\n                source.isNewOrModified = true;\n            }\n        }\n        return null;\n    }\n\n    /**\n     * Returns the source files that are marked as new or modified. The returned list may contain files\n     * that are new or modified, but should nevertheless be ignored in the decision to recompile or not.\n     * In order to decide if a compilation is needed, invoke {@link #isEmptyOrIgnorable(List)} instead\n     * of {@link List#isEmpty()}.\n     *\n     * @return new or modified source files, or an empty list if none\n     */\n    List<SourceFile> getModifiedSources() {\n        return sourceFiles.stream().filter((s) -> s.isNewOrModified).toList();\n    }\n\n    /**\n     * {@return whether the given list of modified files should not cause a recompilation}\n     * This method returns {@code true} if the given list is empty or contains only files\n     * with the {@link SourceFile#ignoreModification} set to {@code true}.\n     *\n     * @param sourceFiles return value of {@link #getModifiedSources()}.\n     */\n    static boolean isEmptyOrIgnorable(List<SourceFile> sourceFiles) {\n        return sourceFiles.stream().allMatch((s) -> s.ignoreModification);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/ModuleDirectoryRemover.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.plugin.compiler;\n\nimport java.io.Closeable;\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\n/**\n * Helper class for removing the directory having a module name.\n * This hack is used when the {@code --module-source-path} compiler option is used\n * but we still want to reproduce the directory layout of Maven 3.\n * This hack is not used when the new {@code <source>} elements is used instead.\n *\n * <p>The code in this class is useful only when {@link AbstractCompilerMojo#SUPPORT_LEGACY} is true.\n * This class can be fully deleted if a future version permanently set above-cited flag to false.</p>\n *\n * @see CompilerMojo#directoryLevelToRemove\n * @see ToolExecutorForTest#directoryLevelToRemove\n */\nfinal class ModuleDirectoryRemover implements Closeable {\n    /**\n     * The output directory expected by Maven 3.\n     * Example: {@code target/classes/META-INF/versions/21}.\n     */\n    private final Path mavenTarget;\n\n    /**\n     * The output directory where {@code javac} will write the classes.\n     * Example: {@code target/classes/META-INF/versions/21/org.foo.bar}.\n     */\n    private final Path javacTarget;\n\n    /**\n     * A temporary directory used as an intermediate step for avoiding name clash.\n     * Example: {@code target/classes/META-INF/versions/org.foo.bar}.\n     */\n    private final Path interTarget;\n\n    /**\n     * Temporarily renames the given output directory for matching the layout of {@code javac} output.\n     *\n     * @param  outputDirectory  the output directory (must exist)\n     * @param  moduleName       the name of the module\n     * @throws IOException if an error occurred while renaming the output directory\n     */\n    private ModuleDirectoryRemover(Path outputDirectory, String moduleName) throws IOException {\n        mavenTarget = outputDirectory;\n        interTarget = Files.move(outputDirectory, outputDirectory.resolveSibling(moduleName));\n        javacTarget = Files.createDirectory(outputDirectory).resolve(moduleName);\n        Files.move(interTarget, javacTarget);\n    }\n\n    /**\n     * Temporarily renames the given output directory for matching the layout of {@code javac} output.\n     *\n     * @param  outputDirectory  the output directory (must exist)\n     * @param  moduleName       the name of the module, or {@code null} if none\n     * @return a handler for restoring the directory to its original name, or {@code null} if there is no renaming\n     * @throws IOException if an error occurred while renaming the output directory\n     */\n    static ModuleDirectoryRemover create(Path outputDirectory, String moduleName) throws IOException {\n        return (moduleName != null) ? new ModuleDirectoryRemover(outputDirectory, moduleName) : null;\n    }\n\n    /**\n     * Restores the output directory to its original name.\n     * Note: contrarily to {@link Closeable} contract, this method is not idempotent:\n     * it cannot be executed twice. However, this is okay for the usage in this package.\n     *\n     * @throws IOException if an error occurred while renaming the output directory\n     */\n    @Override\n    public void close() throws IOException {\n        Files.move(javacTarget, interTarget);\n        Files.delete(mavenTarget);\n        Files.move(interTarget, mavenTarget);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/ModuleInfoOverwrite.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.plugin.compiler;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\nimport static org.apache.maven.plugin.compiler.SourceDirectory.CLASS_FILE_SUFFIX;\nimport static org.apache.maven.plugin.compiler.SourceDirectory.JAVA_FILE_SUFFIX;\nimport static org.apache.maven.plugin.compiler.SourceDirectory.MODULE_INFO;\n\n/**\n * Helper class for the case where a {@code module-info.java} file defined in the tests\n * overwrites the file defined in the main classes. It should be a last-resort practice only,\n * when options such as {@code --add-reads} or {@code --add-exports} are not sufficient.\n *\n * <p>The code in this class is useful only when {@link AbstractCompilerMojo#SUPPORT_LEGACY} is true.\n * This class can be fully deleted if a future version permanently set above-cited flag to false.</p>\n */\nfinal class ModuleInfoOverwrite implements Runnable {\n    /**\n     * Path to the original {@code module-info.java} file. It will need to be temporarily renamed\n     * because otherwise the Java compiler seems to unconditionally compiles it, even if we do not\n     * specify this file in the list of sources to compile.\n     */\n    private final Path testSourceFile;\n\n    /**\n     * Path to the {@code module-info.java.bak} file.\n     */\n    private final Path savedSourceFile;\n\n    /**\n     * Path to the main {@code module-info.class} file to temporarily hide.\n     * This file will be temporarily renamed to {@link #moduleInfoBackup}\n     * before to compile the tests.\n     */\n    private final Path moduleInfoToHide;\n\n    /**\n     * Path to the renamed main {@code module-info.class} file. This file\n     * needs to be renamed as {@link #moduleInfoToHide} after compilation.\n     */\n    private final Path moduleInfoBackup;\n\n    /**\n     * The {@code module-info.class} to use as a replacement for the one which has been renamed.\n     */\n    private final Path moduleInfoReplacement;\n\n    /**\n     * The shutdown hook invoked if the user interrupts the compilation, for example with [Control-C].\n     */\n    private Thread shutdownHook;\n\n    /**\n     * Creates a new instance.\n     */\n    private ModuleInfoOverwrite(Path source, Path main, Path test) {\n        testSourceFile = source;\n        savedSourceFile = source.resolveSibling(MODULE_INFO + JAVA_FILE_SUFFIX + \".bak\");\n        moduleInfoToHide = main;\n        moduleInfoBackup = main.resolveSibling(MODULE_INFO + CLASS_FILE_SUFFIX + \".bak\");\n        moduleInfoReplacement = test;\n    }\n\n    /**\n     * Returns an instance for the given main output directory, or {@code null} if not needed.\n     * This method should be invoked only if a {@code module-info.java} file exists and may\n     * overwrite a file defined in the main classes.\n     */\n    static ModuleInfoOverwrite create(Path source, Path mainOutputDirectory, Path testOutputDirectory)\n            throws IOException {\n        Path main = mainOutputDirectory.resolve(MODULE_INFO + CLASS_FILE_SUFFIX);\n        if (Files.isRegularFile(main)) {\n            Path test = testOutputDirectory.resolve(MODULE_INFO + CLASS_FILE_SUFFIX);\n            if (Files.isRegularFile(test)) {\n                var mo = new ModuleInfoOverwrite(source, main, test);\n                mo.substitute();\n                return mo;\n            }\n        }\n        return null;\n    }\n\n    /**\n     * Replaces the main {@code module-info.class} file by the test one.\n     * The original file is saved in the {@code module-info.class.bak} file.\n     * Then the test {@code module-info.class} is moved to the main directory.\n     * Note that it needs to be moved, not copied or linked, because we need\n     * to temporarily remove {@code module-info.class} from the test directory\n     * (otherwise {@code javac} does not seem to consider that we are patching a module).\n     *\n     * @throws IOException if an error occurred while renaming the file.\n     */\n    private void substitute() throws IOException {\n        Files.move(testSourceFile, savedSourceFile);\n        Files.move(moduleInfoToHide, moduleInfoBackup);\n        Files.move(moduleInfoReplacement, moduleInfoToHide);\n        if (shutdownHook == null) { // Paranoiac check in case this method is invoked twice (should not happen).\n            shutdownHook = new Thread(this);\n            Runtime.getRuntime().addShutdownHook(shutdownHook);\n        }\n    }\n\n    /**\n     * Restores the {@code module-info} file.\n     *\n     * @throws IOException if an error occurred while renaming the file.\n     */\n    void restore() throws IOException {\n        if (shutdownHook != null) {\n            Runtime.getRuntime().removeShutdownHook(shutdownHook);\n        }\n        Files.move(savedSourceFile, testSourceFile); // File to restore in priority.\n        Files.move(moduleInfoToHide, moduleInfoReplacement);\n        Files.move(moduleInfoBackup, moduleInfoToHide);\n    }\n\n    /**\n     * Invoked during JVM shutdown if user interrupted the compilation, for example with [Control-C].\n     */\n    @Override\n    @SuppressWarnings(\"CallToPrintStackTrace\")\n    public void run() {\n        shutdownHook = null;\n        try {\n            restore();\n        } catch (IOException e) {\n            // We cannot do much better because the loggers are shutting down.\n            e.printStackTrace();\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/ModuleInfoPatch.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.plugin.compiler;\n\nimport java.io.BufferedWriter;\nimport java.io.IOException;\nimport java.io.Reader;\nimport java.io.StreamTokenizer;\nimport java.lang.module.ModuleDescriptor;\nimport java.nio.file.Path;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.LinkedHashMap;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\nimport java.util.StringJoiner;\n\nimport org.apache.maven.api.Dependency;\nimport org.apache.maven.api.services.DependencyResolverResult;\n\n/**\n * Reader of {@value #FILENAME} files.\n * The main options managed by this class are the options that are not defined by Maven dependencies.\n * They are the options for opening or exporting packages to other modules, or reading more modules.\n * The values of these options are module names or package names.\n * This class does not manage the options for which the value is a path.\n *\n * <h2>Global options</h2>\n * The {@code --add-modules} and {@code --limit-modules} options are global, not options defined on a per-module basis.\n * The global aspect is handled by using shared maps for the {@link #addModules} and {@link #limitModules} fields.\n * The value of {@code --add-modules} is usually controlled by the dependencies declared in the {@code pom.xml} file\n * and rarely needs to be modified.\n *\n * @author Martin Desruisseaux\n */\nfinal class ModuleInfoPatch {\n    /**\n     * Name of {@value} files that are parsed by this class.\n     */\n    public static final String FILENAME = \"module-info-patch.maven\";\n\n    /**\n     * Maven-specific keyword for meaning to export a package to all the test module path.\n     * Other keywords such as {@code \"ALL-MODULE-PATH\"} are understood by the Java compiler.\n     */\n    private static final String TEST_MODULE_PATH = \"TEST-MODULE-PATH\";\n\n    /**\n     * Maven-specific keyword for meaning to export a package to all other modules in the current Maven (sub)project.\n     * This is useful when a module contains a package of test fixtures also used for the tests in all other modules.\n     */\n    private static final String SUBPROJECT_MODULES = \"SUBPROJECT-MODULES\";\n\n    /**\n     * Special cases for the {@code --add-modules} option.\n     * The {@value #TEST_MODULE_PATH} keyword is specific to Maven.\n     * Other keywords in this set are recognized by the Java compiler.\n     */\n    private static final Set<String> ADD_MODULES_SPECIAL_CASES = Set.of(\"ALL-MODULE-PATH\", TEST_MODULE_PATH);\n\n    /**\n     * Special cases for the {@code --add-exports} option.\n     * The {@value #TEST_MODULE_PATH} and {@value #SUBPROJECT_MODULES} keywords are specific to Maven.\n     * Other keywords in this set are recognized by the Java compiler.\n     */\n    private static final Set<String> ADD_EXPORTS_SPECIAL_CASES =\n            Set.of(\"ALL-UNNAMED\", TEST_MODULE_PATH, SUBPROJECT_MODULES);\n\n    /**\n     * The name of the module to patch, or {@code null} if unspecified.\n     *\n     * @see #getModuleName()\n     */\n    private String moduleName;\n\n    /**\n     * Values parsed from the {@value #FILENAME} file for {@code --add-modules} option.\n     * A unique set is shared by {@code ModuleInfoPatch} instances of a project, because there\n     * is only one {@code --add-module} option applying to all modules. The values will be the\n     * union of the values provided by all {@value #FILENAME} files.\n     */\n    private final Set<String> addModules;\n\n    /**\n     * Values parsed from the {@value #FILENAME} file for {@code --limit-modules} option.\n     * A unique set is shared by all {@code ModuleInfoPatch} instances of a project in the\n     * same way as {@link #addModules}.\n     */\n    private final Set<String> limitModules;\n\n    /**\n     * Values parsed from the {@value #FILENAME} file for {@code --add-reads} option.\n     * Option values will be prefixed by {@link #moduleName}.\n     */\n    private final Set<String> addReads;\n\n    /**\n     * Values parsed from the {@value #FILENAME} file for {@code --add-exports} option.\n     * Option values will be prefixed by {@link #moduleName}.\n     * Keys are package names.\n     */\n    private final Map<String, Set<String>> addExports;\n\n    /**\n     * Values parsed from the {@value #FILENAME} file for {@code --add-opens} option.\n     * Option values will be prefixed by {@link #moduleName}.\n     * Keys are package names.\n     */\n    private final Map<String, Set<String>> addOpens;\n\n    /**\n     * A clone of this {@code ModuleInfoPatch} but with runtime dependencies instead of compile-time dependencies.\n     * The information saved in this object are not used by the compiler plugin, because the runtime dependencies\n     * may differ from the runtime dependencies. But we need to save them for the needs of other plugins such as\n     * Surefire. If the compile and runtime dependencies are the same, then the value is {@code this}.\n     */\n    private ModuleInfoPatch runtimeDependencies;\n\n    /**\n     * Creates an initially empty module patch.\n     *\n     * @param defaultModule  the name of the default module if there is no {@value #FILENAME}\n     * @param previous       the previous instance (for sharing global options), or {@code null} if none.\n     */\n    ModuleInfoPatch(String defaultModule, ModuleInfoPatch previous) {\n        if (defaultModule != null && !defaultModule.isBlank()) {\n            moduleName = defaultModule;\n        }\n        if (previous != null) {\n            addModules = previous.addModules;\n            limitModules = previous.limitModules;\n        } else {\n            addModules = new LinkedHashSet<>();\n            limitModules = new LinkedHashSet<>();\n        }\n        addReads = new LinkedHashSet<>();\n        addExports = new LinkedHashMap<>();\n        addOpens = new LinkedHashMap<>();\n        runtimeDependencies = this;\n    }\n\n    /**\n     * Creates a deep clone of the given module info patch.\n     * This is used for initializing the {@link #runtimeDependencies} field.\n     *\n     * @param parent the module info patch to clone\n     */\n    private ModuleInfoPatch(ModuleInfoPatch parent) {\n        moduleName = parent.moduleName;\n        addModules = new LinkedHashSet<>(parent.addModules);\n        limitModules = new LinkedHashSet<>(parent.limitModules);\n        addReads = new LinkedHashSet<>(parent.addReads);\n        addExports = new LinkedHashMap<>(parent.addExports);\n        addOpens = new LinkedHashMap<>(parent.addOpens);\n        // Leave `runtimeDependencies` to null as it would be an error to use it a second time.\n    }\n\n    /**\n     * Creates a module patch with the specified {@code --add-reads} options and everything else empty.\n     *\n     * @param addReads the {@code --add-reads} option\n     * @param moduleName the name of the module to patch\n     *\n     * @see #patchWithSameReads(String)\n     */\n    private ModuleInfoPatch(Set<String> addReads, String moduleName) {\n        this.moduleName = moduleName;\n        this.addReads = addReads;\n        /*\n         * Really need `Collections.emptyFoo()` here, not `Set.of()` or `Map.of()`.\n         * A difference is that the former silently accept calls to `clear()` as\n         * no-operation, while the latter throw `UnsupportedOperationException`.\n         */\n        addModules = Collections.emptySet();\n        limitModules = Collections.emptySet();\n        addExports = Collections.emptyMap();\n        addOpens = Collections.emptyMap();\n        // `runtimeDependencies` to be initialized by the caller.\n    }\n\n    /**\n     * Sets this instance to the default configuration to use when no {@value #FILENAME} is present.\n     */\n    public void setToDefaults() {\n        addModules.add(TEST_MODULE_PATH);\n        addReads.add(TEST_MODULE_PATH);\n    }\n\n    /**\n     * Loads the content of the given stream of characters.\n     * This method does not close the given reader.\n     *\n     * @param source stream of characters to read\n     * @throws IOException if an I/O error occurred while loading the file\n     */\n    public void load(Reader source) throws IOException {\n        var reader = new StreamTokenizer(source);\n        reader.slashSlashComments(true);\n        reader.slashStarComments(true);\n        expectToken(reader, \"patch-module\");\n        moduleName = nextName(reader, true);\n        expectToken(reader, '{');\n        while (reader.nextToken() == StreamTokenizer.TT_WORD) {\n            switch (reader.sval) {\n                case \"add-modules\":\n                    readModuleList(reader, addModules, ADD_MODULES_SPECIAL_CASES);\n                    break;\n                case \"limit-modules\":\n                    readModuleList(reader, limitModules, Set.of());\n                    break;\n                case \"add-reads\":\n                    readModuleList(reader, addReads, Set.of(TEST_MODULE_PATH));\n                    break;\n                case \"add-exports\":\n                    readQualified(reader, addExports, ADD_EXPORTS_SPECIAL_CASES);\n                    break;\n                case \"add-opens\":\n                    readQualified(reader, addOpens, Set.of());\n                    break;\n                default:\n                    throw new ModuleInfoPatchException(\"Unknown keyword \\\"\" + reader.sval + '\"', reader);\n            }\n        }\n        if (reader.ttype != '}') {\n            throw new ModuleInfoPatchException(\"Not a token\", reader);\n        }\n        if (reader.nextToken() != StreamTokenizer.TT_EOF) {\n            throw new ModuleInfoPatchException(\"Expected end of file but found \\\"\" + reader.sval + '\"', reader);\n        }\n    }\n\n    /**\n     * Skips a token which is expected to be equal to the given value.\n     *\n     * @param reader the reader from which to skip a token\n     * @param expected the expected token value\n     * @throws IOException if an I/O error occurred while loading the file\n     * @throws ModuleInfoPatchException if the next token does not have the expected value\n     */\n    private static void expectToken(StreamTokenizer reader, String expected) throws IOException {\n        if (reader.nextToken() != StreamTokenizer.TT_WORD || !expected.equals(reader.sval)) {\n            throw new ModuleInfoPatchException(\"Expected \\\"\" + expected + '\"', reader);\n        }\n    }\n\n    /**\n     * Skips a token which is expected to be equal to the given value.\n     * The expected character must be flagged as an ordinary character in the reader.\n     *\n     * @param reader the reader from which to skip a token\n     * @param expected the expected character value\n     * @throws IOException if an I/O error occurred while loading the file\n     * @throws ModuleInfoPatchException if the next token does not have the expected value\n     */\n    private static void expectToken(StreamTokenizer reader, char expected) throws IOException {\n        if (reader.nextToken() != expected) {\n            throw new ModuleInfoPatchException(\"Expected \\\"\" + expected + '\"', reader);\n        }\n    }\n\n    /**\n     * Returns the next package or module name.\n     * This method verifies that the name is non-empty and a valid Java identifier.\n     *\n     * @param reader the reader from which to get the package or module name\n     * @param module {@code true} is expecting a module name, {@code false} if expecting a package name\n     * @return the package or module name\n     * @throws IOException if an I/O error occurred while loading the file\n     * @throws ModuleInfoPatchException if the next token is not a package or module name\n     */\n    private static String nextName(StreamTokenizer reader, boolean module) throws IOException {\n        if (reader.nextToken() != StreamTokenizer.TT_WORD) {\n            throw new ModuleInfoPatchException(\"Expected a \" + (module ? \"module\" : \"package\") + \" name\", reader);\n        }\n        return ensureValidName(reader, reader.sval.strip(), module);\n    }\n\n    /**\n     * Verifies that the given name is a valid package or module identifier.\n     *\n     * @param reader the reader from which to get the line number if an exception needs to be thrown\n     * @param name the name to verify\n     * @param module {@code true} is expecting a module name, {@code false} if expecting a package name\n     * @throws ModuleInfoPatchException if the next token is not a package or module name\n     * @return the given name\n     */\n    private static String ensureValidName(StreamTokenizer reader, String name, boolean module) {\n        int length = name.length();\n        boolean expectFirstChar = true;\n        int c;\n        for (int i = 0; i < length; i += Character.charCount(c)) {\n            c = name.codePointAt(i);\n            if (expectFirstChar) {\n                if (Character.isJavaIdentifierStart(c)) {\n                    expectFirstChar = false;\n                } else {\n                    break; // Will throw exception because `expectFirstChar` is true.\n                }\n            } else if (!Character.isJavaIdentifierPart(c)) {\n                expectFirstChar = true;\n                if (c != '.') {\n                    break; // Will throw exception because `expectFirstChar` is true.\n                }\n            }\n        }\n        if (expectFirstChar) { // Also true if the name is empty\n            throw new ModuleInfoPatchException(\n                    \"Invalid \" + (module ? \"module\" : \"package\") + \" name \\\"\" + name + '\"', reader);\n        }\n        return name;\n    }\n\n    /**\n     * Reads a list of modules and stores the values in the given set.\n     *\n     * @param reader the reader from which to get the module names\n     * @param target where to store the module names\n     * @param specialCases special values to accept\n     * @return {@code target} or a new set if the target was initially null\n     * @throws IOException if an I/O error occurred while loading the file\n     * @throws ModuleInfoPatchException if the next token is not a module name\n     */\n    private static void readModuleList(StreamTokenizer reader, Set<String> target, Set<String> specialCases)\n            throws IOException {\n        do {\n            while (reader.nextToken() == StreamTokenizer.TT_WORD) {\n                String module = reader.sval.strip();\n                if (!specialCases.contains(module)) {\n                    module = ensureValidName(reader, module, true);\n                }\n                target.add(module);\n            }\n        } while (reader.ttype == ',');\n        if (reader.ttype != ';') {\n            throw new ModuleInfoPatchException(\"Missing ';' character\", reader);\n        }\n    }\n\n    /**\n     * Reads a package name followed by a list of modules names.\n     * Used for qualified exports or qualified opens.\n     *\n     * @param reader the reader from which to get the module names\n     * @param target where to store the module names\n     * @param specialCases special values to accept\n     * @throws IOException if an I/O error occurred while loading the file\n     * @throws ModuleInfoPatchException if the next token is not a module name\n     */\n    private static void readQualified(StreamTokenizer reader, Map<String, Set<String>> target, Set<String> specialCases)\n            throws IOException {\n        String packageName = nextName(reader, false);\n        expectToken(reader, \"to\");\n        readModuleList(reader, modulesForPackage(target, packageName), specialCases);\n    }\n\n    /**\n     * {@return the set of modules associated to the given package name}\n     *\n     * @param target the map where to store the set of modules\n     * @param packageName the package name for which to get a set of modules\n     */\n    private static Set<String> modulesForPackage(Map<String, Set<String>> target, String packageName) {\n        return target.computeIfAbsent(packageName, (key) -> new LinkedHashSet<>());\n    }\n\n    /**\n     * Bit mask for {@link #replaceTestModulePath(DependencyResolverResult)} internal usage.\n     */\n    private static final int COMPILE = 1;\n\n    /**\n     * Bit mask for {@link #replaceTestModulePath(DependencyResolverResult)} internal usage.\n     */\n    private static final int RUNTIME = 2;\n\n    /**\n     * Potentially adds the same value to compile and runtime sets.\n     * Whether to add a value is specified by the {@code scope} bitmask,\n     * which can contain a combination of {@link #COMPILE} and {@link #RUNTIME}.\n     *\n     * @param compile the collection where to add the value if the {@link #COMPILE} bit is set\n     * @param runtime the collection where to add the value if the {@link #RUNTIME} bit is set\n     * @param scope a combination of {@link #COMPILE} and {@link #RUNTIME} bits\n     * @param module the value to potentially add\n     * @return whether at least one collection has been modified\n     */\n    private static boolean addModuleName(Set<String> compile, Set<String> runtime, int scope, String module) {\n        boolean modified = false;\n        if ((scope & COMPILE) != 0) {\n            modified = compile.add(module);\n        }\n        if ((scope & RUNTIME) != 0 && compile != runtime) {\n            modified |= runtime.add(module);\n        }\n        return modified;\n    }\n\n    /**\n     * Potentially adds the same value to compile and runtime exports.\n     * Whether to add a value is specified by the {@code scope} bitmask,\n     * which can contain a combination of {@link #COMPILE} and {@link #RUNTIME}.\n     *\n     * @param packageName name of the package to export\n     * @param scope a combination of {@link #COMPILE} and {@link #RUNTIME} bits\n     * @param module the module for which to export a package\n     * @return whether at least one collection has been modified\n     */\n    private boolean addExport(String packageName, int scope, String module) {\n        Set<String> compile = modulesForPackage(addExports, packageName);\n        Set<String> runtime = compile;\n        if (runtimeDependencies != this) {\n            runtime = modulesForPackage(runtimeDependencies.addExports, packageName);\n        }\n        return addModuleName(compile, runtime, scope, module);\n    }\n\n    /**\n     * Replaces all occurrences of {@link #SUBPROJECT_MODULES} by the actual module names.\n     *\n     * @param sourceDirectories the test source directories for all modules in the project\n     */\n    public void replaceProjectModules(final List<SourceDirectory> sourceDirectories) {\n        for (Map.Entry<String, Set<String>> entry : addExports.entrySet()) {\n            if (entry.getValue().remove(SUBPROJECT_MODULES)) {\n                for (final SourceDirectory source : sourceDirectories) {\n                    final String module = source.moduleName;\n                    if (module != null && !module.equals(moduleName)) {\n                        addExport(entry.getKey(), COMPILE | RUNTIME, module);\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * Replaces all occurrences of {@link #TEST_MODULE_PATH} by the actual module names.\n     * These dependencies are automatically added to the {@code --add-modules} option once for all modules,\n     * then added to the {@code add-reads} option if the user specified the {@code TEST-MODULE-PATH} value.\n     * The latter is on a per-module basis. These options are also added implicitly if the user did not put\n     * a {@value #FILENAME} file in the test.\n     *\n     * @param dependencyResolution the result of resolving the dependencies, or {@code null} if none\n     * @throws IOException if an error occurred while reading information from a dependency\n     */\n    public void replaceTestModulePath(final DependencyResolverResult dependencyResolution) throws IOException {\n        final var exportsToTestModulePath = new LinkedHashSet<String>(); // Packages to export.\n        for (Map.Entry<String, Set<String>> entry : addExports.entrySet()) {\n            if (entry.getValue().remove(TEST_MODULE_PATH)) {\n                exportsToTestModulePath.add(entry.getKey());\n            }\n        }\n        final boolean addAllTestModulePath = addModules.remove(TEST_MODULE_PATH);\n        final boolean readAllTestModulePath = addReads.remove(TEST_MODULE_PATH);\n        if (!addAllTestModulePath && !readAllTestModulePath && exportsToTestModulePath.isEmpty()) {\n            return; // Nothing to do.\n        }\n        if (dependencyResolution == null) {\n            // Note: we could log a warning, but we would need to ensure that it is logged only once.\n            return;\n        }\n        /*\n         * At this point, all `TEST-MODULE-PATCH` special values have been removed, but the actual module names\n         * have not yet been added. The module names may be added in two different instances. This instance is\n         * used for compile-time dependencies, while the `runtime` instance is used for runtime dependencies.\n         * The latter is created only if at least one dependency is different.\n         */\n        final var done = new HashMap<String, Integer>(); // Added modules and their dependencies.\n        for (Map.Entry<Dependency, Path> entry :\n                dependencyResolution.getDependencies().entrySet()) {\n\n            final int scope; // As a bitmask.\n            switch (entry.getKey().getScope()) {\n                case TEST:\n                    scope = COMPILE | RUNTIME;\n                    break;\n                case TEST_ONLY:\n                    scope = COMPILE;\n                    if (runtimeDependencies == this) {\n                        runtimeDependencies = new ModuleInfoPatch(this);\n                    }\n                    break;\n                case TEST_RUNTIME:\n                    scope = RUNTIME;\n                    if (runtimeDependencies == this) {\n                        runtimeDependencies = new ModuleInfoPatch(this);\n                    }\n                    break;\n                default:\n                    continue; // Skip non-test dependencies because they should already be in the main module-info.\n            }\n            Path dependencyPath = entry.getValue();\n            String module = dependencyResolution.getModuleName(dependencyPath).orElse(null);\n            if (module == null) {\n                if (readAllTestModulePath) {\n                    addModuleName(addReads, runtimeDependencies.addReads, scope, \"ALL-UNNAMED\");\n                }\n            } else if (mergeBit(done, module, scope)) {\n                boolean modified = false;\n                if (addAllTestModulePath) {\n                    modified |= addModuleName(addModules, runtimeDependencies.addModules, scope, module);\n                }\n                if (readAllTestModulePath) {\n                    modified |= addModuleName(addReads, runtimeDependencies.addReads, scope, module);\n                }\n                for (String packageName : exportsToTestModulePath) {\n                    modified |= addExport(packageName, scope, module);\n                }\n                /*\n                 * For making the options simpler, we do not add `--add-modules` or `--add-reads`\n                 * options for modules that are required by a module that we already added. This\n                 * simplification is not necessary, but makes the command-line easier to read.\n                 */\n                if (modified) {\n                    dependencyResolution.getModuleDescriptor(dependencyPath).ifPresent((descriptor) -> {\n                        for (ModuleDescriptor.Requires r : descriptor.requires()) {\n                            done.merge(r.name(), scope, (o, n) -> o | n);\n                        }\n                    });\n                }\n            }\n        }\n    }\n\n    /**\n     * Sets the given bit in a map of bit masks.\n     *\n     * @param map the map where to set a bit\n     * @param key key of the entry for which to set a bit\n     * @param bit the bit to set\n     * @return whether the map changed as a result of this operation\n     */\n    private static boolean mergeBit(final Map<String, Integer> map, final String key, final int bit) {\n        Integer mask = map.putIfAbsent(key, bit);\n        if (mask != null) {\n            if ((mask & bit) != 0) {\n                return false;\n            }\n            map.put(key, mask | bit);\n        }\n        return true;\n    }\n\n    /**\n     * Returns a patch for another module with the same {@code --add-reads} options. All other options are empty.\n     * This is used when a {@code ModuleInfoPatch} instance has been created for the implicit options and the\n     * caller wants to replicate these default values to other modules declared in the {@code <sources>}.\n     *\n     * <h4>Constraint</h4>\n     * This method should be invoked <em>after</em> {@link #replaceTestModulePath(DependencyResolverResult)},\n     * otherwise the runtime dependencies derived from {@code TEST-MODULE-PaTH} may not be correct.\n     *\n     * @param otherModule the other module to patch, or {@code null} or empty if none\n     * @return patch for the other module, or {@code null} if {@code otherModule} was null or empty\n     */\n    public ModuleInfoPatch patchWithSameReads(String otherModule) {\n        if (otherModule == null || otherModule.isBlank()) {\n            return null;\n        }\n        var other = new ModuleInfoPatch(addReads, otherModule);\n        other.runtimeDependencies =\n                (runtimeDependencies == this) ? other : new ModuleInfoPatch(runtimeDependencies.addReads, otherModule);\n        return other;\n    }\n\n    /**\n     * {@return the name of the module to patch, or null if unspecified and no default}\n     */\n    public String getModuleName() {\n        return moduleName;\n    }\n\n    /**\n     * Writes the values of the given option if the values is is non-null.\n     *\n     * @param option the option for which to write the values\n     * @param prefix prefix to write, followed by {@code '='}, before the value, or empty if none\n     * @param compile the values to write for the compiler, or {@code null} if none\n     * @param runtime the values to write for the Java launcher\n     * @param configuration where to write the option values for the compiler\n     * @param out where to write the option values for the Java launcher\n     */\n    private static void write(\n            String option,\n            String prefix,\n            Set<String> compile,\n            Set<String> runtime,\n            Options configuration,\n            BufferedWriter out)\n            throws IOException {\n        Set<String> values = runtime;\n        do {\n            if (!values.isEmpty()) {\n                var buffer = new StringJoiner(\",\", (prefix != null) ? prefix + '=' : \"\", \"\");\n                for (String value : values) {\n                    buffer.add(value);\n                }\n                if (values == compile) {\n                    configuration.addIfNonBlank(\"--\" + option, buffer.toString());\n                }\n                if (values == runtime) {\n                    out.append(\"--\").append(option).append(' ').append(buffer.toString());\n                    out.newLine();\n                }\n            }\n        } while (values != compile && (values = compile) != null);\n    }\n\n    /**\n     * Writes options that are qualified by module name and package name.\n     *\n     * @param option the option for which to write the values\n     * @param compile the values to write for the compiler, or {@code null} if none\n     * @param runtime the values to write for the Java launcher\n     * @param configuration where to write the option values for the compiler\n     * @param out where to write the option values for the Java launcher\n     */\n    private void write(\n            String option,\n            Map<String, Set<String>> compile,\n            Map<String, Set<String>> runtime,\n            Options configuration,\n            BufferedWriter out)\n            throws IOException {\n        Map<String, Set<String>> values = runtime;\n        do {\n            for (Map.Entry<String, Set<String>> entry : values.entrySet()) {\n                String prefix = moduleName + '/' + entry.getKey();\n                Set<String> otherModules = entry.getValue();\n                write(\n                        option,\n                        prefix,\n                        (values == compile) ? otherModules : null,\n                        (values == runtime) ? otherModules : Set.of(),\n                        configuration,\n                        out);\n            }\n        } while (values != compile && (values = compile) != null);\n    }\n\n    /**\n     * Writes the options.\n     *\n     * @param compile where to write the compile-time options\n     * @param runtime where to write the runtime options\n     */\n    public void writeTo(final Options compile, final BufferedWriter runtime) throws IOException {\n        write(\"add-modules\", null, addModules, runtimeDependencies.addModules, compile, runtime);\n        write(\"limit-modules\", null, limitModules, runtimeDependencies.limitModules, compile, runtime);\n        if (moduleName != null) {\n            write(\"add-reads\", moduleName, addReads, runtimeDependencies.addReads, compile, runtime);\n            write(\"add-exports\", addExports, runtimeDependencies.addExports, compile, runtime);\n            write(\"add-opens\", null, runtimeDependencies.addOpens, compile, runtime);\n        }\n        addModules.clear(); // Add modules only once (this set is shared by other instances).\n        limitModules.clear();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/ModuleInfoPatchException.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.plugin.compiler;\n\nimport java.io.StreamTokenizer;\n\n/**\n * Thrown when a {@code module-info-patch.maven} file cannot be parsed.\n *\n * @author Martin Desruisseaux\n */\n@SuppressWarnings(\"serial\")\npublic class ModuleInfoPatchException extends CompilationFailureException {\n    /**\n     * Creates a new exception with the given message.\n     *\n     * @param message the short message\n     */\n    public ModuleInfoPatchException(String message) {\n        super(message);\n    }\n\n    /**\n     * Creates a new exception with the given message followed by \"at line\" and the line number.\n     * This is not in public API because the use of {@link StreamTokenizer} is an implementation\n     * details that may change in any future version.\n     *\n     * @param message the short message\n     * @param reader the reader used for parsing the file\n     */\n    ModuleInfoPatchException(String message, StreamTokenizer reader) {\n        super(message + \" at line \" + reader.lineno());\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/Options.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.plugin.compiler;\n\nimport javax.tools.OptionChecker;\n\nimport java.io.IOException;\nimport java.io.UncheckedIOException;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.List;\nimport java.util.Locale;\nimport java.util.function.UnaryOperator;\n\nimport org.apache.maven.api.plugin.Log;\n\n/**\n * A helper class for preparing the options to pass to the tool (compiler or document generator).\n * It does <em>not</em> include the options related to paths (class-path, destination directory, <i>etc.</i>).\n * If an option is unsupported by the tool, a message is logged at the warning level.\n *\n * @author Martin Desruisseaux\n */\npublic final class Options {\n    /**\n     * The list of options with their values. For example, in order to compile for Java 17,\n     * {@code --release} and {@code 17} shall be two consecutive elements in this list.\n     */\n    final List<String> options;\n\n    /**\n     * Index of the value of the {@code --release} parameter, or 0 if not present.\n     *\n     * @see #setRelease(String)\n     */\n    private int indexOfReleaseValue;\n\n    /**\n     * The tools to use for checking whether an option is supported.\n     * It can be the Java compiler or the Javadoc generator.\n     */\n    private final OptionChecker checker;\n\n    /**\n     * Where to report warnings about unsupported options.\n     */\n    private final Log logger;\n\n    /**\n     * The warning message to log. This is used when a warning is not logged immediately,\n     * but deferred for allowing the caller to complete the message before to log.\n     */\n    private String warning;\n\n    /**\n     * Creates an initially empty list of options.\n     *\n     * @param checker the tools to use for checking whether an option is supported\n     * @param logger where to report warnings about unsupported options\n     */\n    Options(OptionChecker checker, Log logger) {\n        options = new ArrayList<>();\n        this.checker = checker;\n        this.logger = logger;\n    }\n\n    /**\n     * Strips white spaces and returns the result if non-empty, or {@code null} otherwise.\n     *\n     * @param value  the value from which to strip white spaces, or {@code null}\n     * @return the stripped value, or {@code null} if the value was null or blank\n     */\n    private static String strip(String value) {\n        if (value != null) {\n            value = value.strip();\n            if (value.isEmpty()) {\n                return null;\n            }\n        }\n        return value;\n    }\n\n    /**\n     * Adds or sets the value of the {@code --release} option. If this option was not present, it is added.\n     * If this option has already been specified, then its value is changed to the given value if non-null\n     * and non-blank, or removed otherwise.\n     *\n     * @param value value of the {@code --release} option, or {@code null} or empty if none\n     * @return whether the option has been added or defined\n     */\n    public boolean setRelease(String value) {\n        if (indexOfReleaseValue == 0) {\n            boolean added = addIfNonBlank(\"--release\", value);\n            if (added) {\n                indexOfReleaseValue = options.size() - 1;\n            }\n            return added;\n        }\n        value = strip(value);\n        if (value != null) {\n            options.set(indexOfReleaseValue, value);\n            return true;\n        }\n        options.subList(indexOfReleaseValue - 1, indexOfReleaseValue + 1).clear();\n        indexOfReleaseValue = 0;\n        return false;\n    }\n\n    /**\n     * Adds the given option if the given value is true and the option is supported.\n     * If the option is unsupported, then a warning is logged and the option is not added.\n     *\n     * @param option the option (e.g. {@code --enable-preview})\n     * @param value value of the option\n     * @return whether the option has been added\n     */\n    public boolean addIfTrue(String option, boolean value) {\n        if (value && checkNumberOfArguments(option, 0, true)) {\n            options.add(option);\n            return true;\n        }\n        return false;\n    }\n\n    /**\n     * Adds the given option if a non-null and non-blank value is provided and if the option is supported.\n     * If the option is unsupported by the tool, then a warning is logged and the option is not added.\n     *\n     * @param option the option (e.g., {@code --release})\n     * @param value value of the option, or {@code null} or blank if none\n     * @return whether the option has been added\n     */\n    public boolean addIfNonBlank(String option, String value) {\n        value = strip(value);\n        if (value != null) {\n            if (checkNumberOfArguments(option, 1, true)) {\n                options.add(option);\n                options.add(value);\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * Adds the given option using the {@code option:values} syntax where {@code values} is a coma-separated list.\n     * The option is added only if at least one non-blank value is provided. Values are converted to lower cases.\n     * Leading and trailing spaces are removed. If a filter is specified, then that filter will receive the values\n     * specified by the users and shall return the values to append, or {@code null} for not appending the option.\n     *\n     * @param option the option (e.g. {@code -g})\n     * @param values coma-separated values of the option, or {@code null} if none\n     * @param valids valid values for better error message when needed, or {@code null} if unspecified\n     * @param filter filter to apply on the values before to add them, or {@code null} if none\n     * @return whether the option has been added\n     */\n    public boolean addComaSeparated(\n            final String option, String values, Collection<String> valids, UnaryOperator<String[]> filter) {\n        if (values == null) {\n            return false;\n        }\n        /*\n         * Rebuild the comma-separated list of options with spaces removed, empty values omitted and case\n         * changed to lower-case. The split list will be reused for diagnostic if the option is not accepted.\n         */\n        String[] split = values.split(\",\");\n        int count = 0;\n        for (String value : split) {\n            value = value.strip();\n            if (!value.isEmpty()) {\n                split[count++] = value.toLowerCase(Locale.US);\n            }\n        }\n        /*\n         * If a filter is specified, replace the user-specified list by the filtered one.\n         * The filtering may result in an empty list, which is interpreted as an option without value.\n         * This is different than an absence of user-supplied values, which is interpreted as no option.\n         * This subtle difference explains why the check for absence of values is done before filtering,\n         * and is needed for making possible to replace \"-g:all\" by \"-g\" (because the \"all\" value is a\n         * Maven addition).\n         */\n        if (count == 0) {\n            return false;\n        }\n        if (filter != null) {\n            if (count != split.length) {\n                split = Arrays.copyOfRange(split, 0, count);\n            }\n            split = filter.apply(split);\n            if (split == null) {\n                return false;\n            }\n            count = split.length;\n        }\n        /*\n         * Format the option (possibly with no values), then validate.\n         */\n        var sb = new StringBuilder(option);\n        for (int i = 0; i < count; i++) {\n            sb.append(i == 0 ? ':' : ',').append(split[i]);\n        }\n        String s = sb.toString();\n        if (checkNumberOfArguments(s, 0, false)) {\n            options.add(s);\n            return true;\n        }\n        /*\n         * A log message has been prepared in the `warning` field for saying that the option is not supported.\n         * If a collection of valid options was provided, use it for identifying which option was invalid.\n         */\n        if (valids != null) {\n            for (int i = 0; i < count; i++) {\n                String value = split[i];\n                if (!valids.contains(value)) {\n                    sb.setLength(0);\n                    sb.append(warning);\n                    sb.setLength(sb.length() - 1); // Remove the trailing dot.\n                    sb.append(\", because the specified \")\n                            .append(option)\n                            .append(\" value '\")\n                            .append(value)\n                            .append(\"' is unexpected. Legal values are: \");\n                    int j = 0;\n                    for (String valid : valids) {\n                        if (j++ != 0) {\n                            sb.append(\", \");\n                            if (j == valids.size()) {\n                                sb.append(\"and \");\n                            }\n                        }\n                        sb.append('\\'').append(valid).append('\\'');\n                    }\n                    warning = sb.append('.').toString();\n                    break;\n                }\n            }\n        }\n        logger.warn(warning);\n        warning = null;\n        return false;\n    }\n\n    /**\n     * Verifies the validity of the given memory setting and adds it as an option.\n     * If the value has no units and Maven defaults are enabled, appends \"M\" as the default units of measurement.\n     * Note: in the International System of Units, the symbol shall be upper-case \"M\". The lower-case \"m\" symbol\n     * is not correct as it stands for \"milli\".\n     *\n     * @param option the option (e.g. {@code -J-Xms})\n     * @param label name of the XML element or attribute, used only if a warning message needs to be produced\n     * @param value the memory setting, or {@code null} if none\n     * @param addDefaultUnit whether to add a default unit (currently 'M') if none is provided\n     * @return whether the option has been added\n     */\n    public boolean addMemoryValue(String option, String label, String value, boolean addDefaultUnit) {\n        value = strip(value);\n        if (value != null) {\n            int length = value.length();\n            for (int i = 0; i < length; i++) {\n                char c = value.charAt(i);\n                if (c < '0' || c > '9') { // Do no use `isDigit(…)` because we do not accept other languages.\n                    if (i == length - 1) {\n                        c = Character.toUpperCase(c);\n                        if (c == 'K' || c == 'M' || c == 'G') {\n                            addDefaultUnit = false;\n                            break;\n                        }\n                    }\n                    logger.warn(\"Invalid value for \" + label + \"=\\\"\" + value + \"\\\". Ignoring this option.\");\n                    return false;\n                }\n            }\n            if (addDefaultUnit) {\n                value += 'M'; // Upper case because this is the correct case in International System of Units.\n                logger.warn(\"Value \" + label + \"=\\\"\" + value + \"\\\" has been specified without unit. \"\n                        + \"An explicit \\\"M\\\" unit symbol should be appended for avoiding ambiguity.\");\n            }\n            option += value;\n            if (checkNumberOfArguments(option, 0, true)) {\n                options.add(option);\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * Verifies if the given option is supported and accepts the given number of arguments.\n     * If not, a warning is logged if {@code immediate} is {@code true}, or stored in the\n     * {@link #warning} field if {@code immediate} is {@code false}.\n     *\n     * <p>If a message is stored in {@link #warning}, then it will always end with a dot.\n     * This guarantee allows callers to delete the last character and replace it by a coma\n     * for continuing the sentence.</p>\n     *\n     * @param option the option to validate\n     * @param count the number of arguments that the caller wants to provide\n     * @param immediate whether to log immediately or to store the message in {@link #warning}\n     * @return whether the given option is supported and accepts the specified number of arguments\n     */\n    private boolean checkNumberOfArguments(String option, int count, boolean immediate) {\n        int expected = checker.isSupportedOption(option);\n        if (expected == count) {\n            warning = null;\n            return true;\n        } else if (expected < 1) {\n            if (checker instanceof ForkedCompiler) {\n                return true; // That implementation actually knows nothing about which options are supported.\n            }\n            warning = \"The '\" + option + \"' option is not supported.\";\n        } else if (expected == 0) {\n            warning = \"The '\" + option + \"' option does not expect any argument.\";\n        } else if (expected == 1) {\n            warning = \"The '\" + option + \"' option expects a single argument.\";\n        } else {\n            warning = \"The '\" + option + \"' option expects \" + expected + \" arguments.\";\n        }\n        if (immediate) {\n            logger.warn(warning);\n            warning = null;\n        }\n        return false;\n    }\n\n    /**\n     * Adds the non-null and non-empty elements without verifying their validity.\n     * This method is used for user-specified compiler arguments.\n     *\n     * @param arguments the arguments to add, or {@code null} or empty if none\n     */\n    public void addUnchecked(Iterable<String> arguments) {\n        if (arguments != null) {\n            for (String arg : arguments) {\n                if (arg != null) {\n                    arg = arg.strip();\n                    if (!arg.isEmpty()) {\n                        options.add(arg);\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * Splits the given arguments around spaces, then adds them without verifying their validity.\n     * This is used for user-specified arguments.\n     *\n     * @param arguments the arguments to add, or {@code null} if none\n     *\n     * @deprecated Use {@link #addUnchecked(Iterable)} instead. This method does not check for quoted strings.\n     */\n    @Deprecated(since = \"4.0.0\")\n    void addUnchecked(String arguments) {\n        if (arguments != null) {\n            addUnchecked(Arrays.asList(arguments.split(\" \")));\n        }\n    }\n\n    /**\n     * Formats the options for debugging purposes.\n     *\n     * @param commandLine the prefix where to put the {@code -J} options before all other options\n     * @param out where to put all options other than {@code -J}\n     * @throws IOException if an error occurred while writing an option\n     */\n    void format(final StringBuilder commandLine, final Appendable out) throws IOException {\n        boolean hasOptions = false;\n        for (String option : options) {\n            if (option.isBlank()) {\n                continue;\n            }\n            if (option.startsWith(\"-J\")) {\n                if (commandLine != null) {\n                    if (commandLine.length() != 0) {\n                        commandLine.append(' ');\n                    }\n                    commandLine.append(option);\n                }\n                continue;\n            }\n            if (hasOptions) {\n                if (option.charAt(0) == '-') {\n                    out.append(System.lineSeparator());\n                } else {\n                    out.append(' ');\n                }\n            }\n            boolean needsQuote = option.indexOf(' ') >= 0;\n            if (needsQuote) {\n                out.append(AbstractCompilerMojo.QUOTE);\n            }\n            out.append(option);\n            if (needsQuote) {\n                out.append(AbstractCompilerMojo.QUOTE);\n            }\n            hasOptions = true;\n        }\n        if (hasOptions) {\n            out.append(System.lineSeparator());\n        }\n    }\n\n    /**\n     * {@return a string representation of the options for debugging purposes}\n     */\n    @Override\n    public String toString() {\n        var out = new StringBuilder(40);\n        try {\n            format(out, out);\n        } catch (IOException e) {\n            throw new UncheckedIOException(e);\n        }\n        return out.toString();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/PathFilter.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.plugin.compiler;\n\nimport java.io.IOException;\nimport java.io.UncheckedIOException;\nimport java.nio.file.FileSystem;\nimport java.nio.file.FileVisitOption;\nimport java.nio.file.FileVisitResult;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.PathMatcher;\nimport java.nio.file.SimpleFileVisitor;\nimport java.nio.file.attribute.BasicFileAttributes;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.EnumSet;\nimport java.util.List;\n\n/**\n * Applies inclusion and exclusion filters on paths, and builds a list of files in a directory tree.\n * The set of allowed syntax contains at least \"glob\" and \"regex\".\n * See {@link FileSystem#getPathMatcher(String)} Javadoc for a description of the \"glob\" syntax.\n * If no syntax is specified, then the default syntax is a derivative of the \"glob\" syntax which\n * reproduces the behavior of Maven 3.\n *\n * <p>The list of files to process is built by applying the path matcher on each regular (non directory) files.\n * The walk in file trees has the following characteristics:</p>\n *\n * <ul>\n *   <li>Symbolic links are followed.</li>\n *   <li>Hidden files and hidden directories are ignored.</li>\n * </ul>\n *\n * Instances of this class can be reused for filtering many directories, but is not thread safe.\n * Each instance shall be used by a single thread only.\n *\n * @author Martin Desruisseaux\n */\nfinal class PathFilter extends SimpleFileVisitor<Path> {\n    /**\n     * Whether to use the default include pattern.\n     * The pattern depends on the type of source file.\n     *\n     * @see javax.tools.JavaFileObject.Kind#extension\n     */\n    private final boolean useDefaultInclude;\n\n    /**\n     * Inclusion filters for the files in the directories to walk as specified in the plugin configuration.\n     * The array should contain at least one element. If {@link #useDefaultInclude} is {@code true}, then\n     * this array length shall be exactly 1 and the single element is overwritten for each directory to walk.\n     *\n     * @see SourceDirectory#includes\n     */\n    private final String[] includes;\n\n    /**\n     * Exclusion filters for the files in the directories to walk as specified in the plugin configuration.\n     *\n     * @see SourceDirectory#excludes\n     */\n    private final String[] excludes;\n\n    /**\n     * Combination of include and exclude filters. This is an instance of {@link PathSelector},\n     * unless the includes/excludes can be simplified to a single standard matcher instance.\n     */\n    private PathMatcher matchers;\n\n    /**\n     * All exclusion filters for incremental build calculation, or an empty list if none.\n     * Updated files, if excluded by a pattern, will not cause the project to be rebuilt.\n     */\n    private final Collection<String> incrementalExcludes;\n\n    /**\n     * The matchers for exclusion filters for incremental build calculation.\n     * May be an instance of {@link PathSelector}, or {@code null} if none.\n     */\n    private PathMatcher incrementalExcludeMatchers;\n\n    /**\n     * The result of listing all files, or {@code null} if no walking is in progress.\n     * This field is temporarily assigned a value when walking in a tree of directories,\n     * then reset to {@code null} after the walk finished.\n     */\n    private List<SourceFile> sourceFiles;\n\n    /**\n     * The root directory of files being scanned.\n     * This field is temporarily assigned a value when walking in a tree of directories,\n     * then reset to {@code null} after the walk finished.\n     */\n    private SourceDirectory sourceRoot;\n\n    /**\n     * Creates a new filter.\n     *\n     * @param mojo the <abbr>MOJO</abbr> from which to take the includes/excludes configuration\n     */\n    PathFilter(AbstractCompilerMojo mojo) {\n        Collection<String> specified = mojo.getIncludes();\n        useDefaultInclude = specified.isEmpty();\n        if (useDefaultInclude) {\n            specified = List.of(\"**\"); // Place-holder replaced by \"**/*.java\" in `test(…)`.\n        }\n        includes = specified.toArray(String[]::new);\n        excludes = mojo.getExcludes().toArray(String[]::new);\n        incrementalExcludes = mojo.getIncrementalExcludes();\n    }\n\n    /**\n     * Invoked for a file in a directory. If the given file passes the include/exclude filters,\n     * then it is added to the list of source files.\n     *\n     * @param  file  the source file to test\n     * @param  attrs the file basic attributes\n     * @return {@link FileVisitResult#CONTINUE}\n     */\n    @Override\n    public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n        if (matchers.matches(file)) {\n            sourceFiles.add(new SourceFile(\n                    sourceRoot,\n                    file,\n                    attrs,\n                    (incrementalExcludeMatchers != null) && incrementalExcludeMatchers.matches(file)));\n        }\n        return FileVisitResult.CONTINUE;\n    }\n\n    /**\n     * Invoked for a directory before entries in the directory are visited.\n     * If the directory is hidden, then it is skipped.\n     */\n    @Override\n    public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n        return Files.isHidden(dir) ? FileVisitResult.SKIP_SUBTREE : FileVisitResult.CONTINUE;\n    }\n\n    /**\n     * {@return all source files found in the given root directories}\n     * The include and exclude filters specified at construction time are applied.\n     * Hidden directories are ignored, and symbolic links are followed.\n     *\n     * @param rootDirectories the root directories to scan\n     * @throws IOException if a root directory cannot be walked\n     */\n    public List<SourceFile> walkSourceFiles(Iterable<SourceDirectory> rootDirectories) throws IOException {\n        final var result = new ArrayList<SourceFile>();\n        try {\n            sourceFiles = result;\n            for (SourceDirectory directory : rootDirectories) {\n                if (!incrementalExcludes.isEmpty()) {\n                    incrementalExcludeMatchers = new PathSelector(directory.root, incrementalExcludes, null).simplify();\n                }\n                String[] includesOrDefault = includes;\n                if (useDefaultInclude) {\n                    if (directory.includes.isEmpty()) {\n                        includesOrDefault[0] = \"glob:**\" + directory.fileKind.extension;\n                    } else {\n                        includesOrDefault = null;\n                    }\n                }\n                sourceRoot = directory;\n                matchers = new PathSelector(\n                                directory.root,\n                                concat(directory.includes, includesOrDefault),\n                                concat(directory.excludes, excludes))\n                        .simplify();\n                Files.walkFileTree(directory.root, EnumSet.of(FileVisitOption.FOLLOW_LINKS), Integer.MAX_VALUE, this);\n            }\n        } catch (UncheckedIOException e) {\n            throw e.getCause();\n        } finally {\n            sourceRoot = null;\n            sourceFiles = null;\n            matchers = null;\n        }\n        return result;\n    }\n\n    /**\n     * Returns the concatenation of patterns specified in the source with the patterns specified in the plugin.\n     * As a side-effect, this method set the {@link #needRelativize} flag to {@code true} if at least one pattern\n     * does not start with {@code \"**\"}. The latter is a slight optimization for avoiding the need to relativize\n     * each path before to give it to a matcher when this relativization is not necessary.\n     *\n     * @param source  the patterns specified in the {@code <source>} element\n     * @param plugin  the patterns specified in the {@code <plugin>} element, or null if none\n     */\n    private static List<String> concat(List<String> source, String[] plugin) {\n        if (plugin == null || plugin.length == 0) {\n            return source;\n        }\n        var patterns = new ArrayList<String>(source);\n        patterns.addAll(Arrays.asList(plugin));\n        return patterns;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/PathSelector.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.plugin.compiler;\n\nimport java.io.File;\nimport java.nio.file.FileSystem;\nimport java.nio.file.Path;\nimport java.nio.file.PathMatcher;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.Iterator;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.Set;\n\n/**\n * Determines whether a path is selected according to include/exclude patterns.\n * The pathnames used for method parameters will be relative to some base directory\n * and use {@code '/'} as separator, regardless of the hosting operating system.\n *\n * <h2>Syntax</h2>\n * If a pattern contains the {@code ':'} character and the prefix before is longer than 1 character,\n * then that pattern is given verbatim to {@link FileSystem#getPathMatcher(String)}, which interprets\n * the part before {@code ':'} as the syntax (usually {@code \"glob\"} or {@code \"regex\"}).\n * If a pattern does not contain the {@code ':'} character, or if the prefix is one character long\n * (interpreted as a Windows drive), then the syntax defaults to a reproduction of the Maven 3 behavior.\n * This is implemented as the {@code \"glob\"} syntax with the following modifications:\n *\n * <ul>\n *   <li>The platform-specific separator ({@code '\\\\'} on Windows) is replaced by {@code '/'}.\n *       Note that it means that the backslash cannot be used for escaping characters.</li>\n *   <li>Trailing {@code \"/\"} is completed as {@code \"/**\"}.</li>\n *   <li>The {@code \"**\"} wildcard means \"0 or more directories\" instead of \"1 or more directories\".\n *       This is implemented by adding variants of the pattern without the {@code \"**\"} wildcard.</li>\n *   <li>Bracket characters [ ] and { } are escaped.</li>\n *   <li>On Unix only, the escape character {@code '\\\\'} is itself escaped.</li>\n * </ul>\n *\n * If above changes are not desired, put an explicit {@code \"glob:\"} prefix before the pattern.\n * Note that putting such a prefix is recommended anyway for better performances.\n *\n * @author Benjamin Bentmann\n * @author Martin Desruisseaux\n *\n * @see java.nio.file.FileSystem#getPathMatcher(String)\n */\nfinal class PathSelector implements PathMatcher {\n    /**\n     * Maximum number of characters of the prefix before {@code ':'} for handling as a Maven syntax.\n     */\n    private static final int MAVEN_SYNTAX_THRESHOLD = 1;\n\n    /**\n     * The default syntax to use if none was specified. Note that when this default syntax is applied,\n     * the user-provided pattern get some changes as documented in class Javadoc.\n     */\n    private static final String DEFAULT_SYNTAX = \"glob:\";\n\n    /**\n     * Characters having a special meaning in the glob syntax.\n     *\n     * @see FileSystem#getPathMatcher(String)\n     */\n    private static final String SPECIAL_CHARACTERS = \"*?[]{}\\\\\";\n\n    /**\n     * A path matcher which accepts all files.\n     *\n     * @see #simplify()\n     */\n    private static final PathMatcher INCLUDES_ALL = (path) -> true;\n\n    /**\n     * String representations of the normalized include filters.\n     * Each pattern shall be prefixed by its syntax, which is {@value #DEFAULT_SYNTAX} by default.\n     * An empty array means to include all files.\n     *\n     * @see #toString()\n     */\n    private final String[] includePatterns;\n\n    /**\n     * String representations of the normalized exclude filters.\n     * Each pattern shall be prefixed by its syntax. If no syntax is specified,\n     * the default is a Maven 3 syntax similar, but not identical, to {@value #DEFAULT_SYNTAX}.\n     * This array may be longer or shorter than the user-supplied excludes, depending on whether\n     * default excludes have been added and whether some unnecessary excludes have been omitted.\n     *\n     * @see #toString()\n     */\n    private final String[] excludePatterns;\n\n    /**\n     * The matcher for includes. The length of this array is equal to {@link #includePatterns} array length.\n     * An empty array means to include all files.\n     */\n    private final PathMatcher[] includes;\n\n    /**\n     * The matcher for excludes. The length of this array is equal to {@link #excludePatterns} array length.\n     */\n    private final PathMatcher[] excludes;\n\n    /**\n     * The matcher for all directories to include. This array includes the parents of all those directories,\n     * because they need to be accepted before we can walk to the sub-directories.\n     * This is an optimization for skipping whole directories when possible.\n     * An empty array means to include all directories.\n     */\n    private final PathMatcher[] dirIncludes;\n\n    /**\n     * The matcher for directories to exclude. This array does <em>not</em> include the parent directories,\n     * because they may contain other sub-trees that need to be included.\n     * This is an optimization for skipping whole directories when possible.\n     */\n    private final PathMatcher[] dirExcludes;\n\n    /**\n     * The base directory. All files will be relativized to that directory before to be matched.\n     */\n    private final Path baseDirectory;\n\n    /**\n     * Whether paths must be relativized before to be given to a matcher. If {@code true}, then every paths\n     * will be made relative to {@link #baseDirectory} for allowing patterns like {@code \"foo/bar/*.java\"}\n     * to work. As a slight optimization, we can skip this step if all patterns start with {@code \"**\"}.\n     */\n    private final boolean needRelativize;\n\n    /**\n     * Creates a new selector from the given includes and excludes.\n     *\n     * @param directory the base directory of the files to filter\n     * @param includes the patterns of the files to include, or null or empty for including all files\n     * @param excludes the patterns of the files to exclude, or null or empty for no exclusion\n     */\n    PathSelector(Path directory, Collection<String> includes, Collection<String> excludes) {\n        includePatterns = normalizePatterns(includes, false);\n        excludePatterns = normalizePatterns(effectiveExcludes(excludes, includePatterns), true);\n        baseDirectory = directory;\n        FileSystem fs = directory.getFileSystem();\n        this.includes = matchers(fs, includePatterns);\n        this.excludes = matchers(fs, excludePatterns);\n        dirIncludes = matchers(fs, directoryPatterns(includePatterns, false));\n        dirExcludes = matchers(fs, directoryPatterns(excludePatterns, true));\n        needRelativize = needRelativize(includePatterns) || needRelativize(excludePatterns);\n    }\n\n    /**\n     * Returns the given array of excludes, optionally expanded with a default set of excludes,\n     * then with unnecessary excludes omitted. An unnecessary exclude is an exclude which will never\n     * match a file because there is no include which would accept a file that could match the exclude.\n     * For example, if the only include is {@code \"*.java\"}, then the <code>\"**&sol;project.pj\"</code>,\n     * <code>\"**&sol;.DS_Store\"</code> and other excludes will never match a file and can be omitted.\n     * Because the list of {@linkplain #DEFAULT_EXCLUDES default excludes} contains many elements,\n     * removing unnecessary excludes can reduce a lot the number of matches tested on each source file.\n     *\n     * <h4>Implementation note</h4>\n     * The removal of unnecessary excludes is done on a best effort basis. The current implementation\n     * compares only the prefixes and suffixes of each pattern, keeping the pattern in case of doubt.\n     * This is not bad, but it does not remove all unnecessary patterns. It would be possible to do\n     * better in the future if benchmarking suggests that it would be worth the effort.\n     *\n     * @param excludes the user-specified excludes, potentially not yet converted to glob syntax\n     * @param includes the include patterns converted to glob syntax\n     * @param useDefaultExcludes whether to expand user exclude with the set of default excludes\n     * @return the potentially expanded or reduced set of excludes to use\n     */\n    private static Collection<String> effectiveExcludes(Collection<String> excludes, final String[] includes) {\n        if (excludes == null || excludes.isEmpty()) {\n            return List.of();\n        } else {\n            excludes = new ArrayList<>(excludes);\n            excludes.removeIf(Objects::isNull);\n        }\n        if (includes.length == 0) {\n            return excludes;\n        }\n        /*\n         * Get the prefixes and suffixes of all includes, stopping at the first special character.\n         * Redundant prefixes and suffixes are omitted.\n         */\n        var prefixes = new String[includes.length];\n        var suffixes = new String[includes.length];\n        for (int i = 0; i < includes.length; i++) {\n            String include = includes[i];\n            if (!include.startsWith(DEFAULT_SYNTAX)) {\n                return excludes; // Do not filter if at least one pattern is too complicated.\n            }\n            include = include.substring(DEFAULT_SYNTAX.length());\n            prefixes[i] = prefixOrSuffix(include, false);\n            suffixes[i] = prefixOrSuffix(include, true);\n        }\n        prefixes = sortByLength(prefixes, false);\n        suffixes = sortByLength(suffixes, true);\n\n        /*\n         * Keep only the excludes which start with one of the prefixes and end with one of the suffixes.\n         * Note that a prefix or suffix may be the empty string, which matches everything.\n         */\n        final Iterator<String> it = excludes.iterator();\n        while (it.hasNext()) {\n            final String exclude = it.next();\n            final int s = exclude.indexOf(':');\n            if (s <= MAVEN_SYNTAX_THRESHOLD || exclude.startsWith(DEFAULT_SYNTAX)) {\n                if (cannotMatch(exclude, prefixes, false) || cannotMatch(exclude, suffixes, true)) {\n                    it.remove();\n                }\n            }\n        }\n        return excludes;\n    }\n\n    /**\n     * Returns the maximal amount of ordinary characters at the beginning or end of the given pattern.\n     * The prefix or suffix stops at the first {@linkplain #SPECIAL_CHARACTERS special character}.\n     *\n     * @param include the pattern for which to get a prefix or suffix without special character\n     * @param suffix {@code false} if a prefix is desired, or {@code true} if a suffix is desired\n     */\n    private static String prefixOrSuffix(final String include, boolean suffix) {\n        int s = suffix ? -1 : include.length();\n        for (int i = SPECIAL_CHARACTERS.length(); --i >= 0; ) {\n            char c = SPECIAL_CHARACTERS.charAt(i);\n            if (suffix) {\n                s = Math.max(s, include.lastIndexOf(c));\n            } else {\n                int p = include.indexOf(c);\n                if (p >= 0 && p < s) {\n                    s = p;\n                }\n            }\n        }\n        return suffix ? include.substring(s + 1) : include.substring(0, s);\n    }\n\n    /**\n     * Returns {@code true} if the given exclude cannot match any include patterns.\n     * In case of doubt, returns {@code false}.\n     *\n     * @param exclude the exclude pattern to test\n     * @param fragments the prefixes or suffixes (fragments without special characters) of the includes\n     * @param suffix {@code false} if the specified fragments are prefixes, {@code true} if they are suffixes\n     * @return {@code true} if it is certain that the exclude pattern cannot match, or {@code false} in case of doubt\n     */\n    private static boolean cannotMatch(String exclude, final String[] fragments, final boolean suffix) {\n        exclude = prefixOrSuffix(exclude, suffix);\n        for (String fragment : fragments) {\n            int fg = fragment.length();\n            int ex = exclude.length();\n            int length = Math.min(fg, ex);\n            if (suffix) {\n                fg -= length;\n                ex -= length;\n            } else {\n                fg = 0;\n                ex = 0;\n            }\n            if (exclude.regionMatches(ex, fragment, fg, length)) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * Sorts the given patterns by their length. The main intent is to have the empty string first,\n     * while will cause the loops testing for prefixes and suffixes to stop almost immediately.\n     * Short prefixes or suffixes are also more likely to be matched.\n     *\n     * @param fragments the fragments to sort in-place\n     * @param suffix {@code false} if the specified fragments are prefixes, {@code true} if they are suffixes\n     * @return the given array, or a smaller array if some fragments were discarded because redundant\n     */\n    private static String[] sortByLength(final String[] fragments, final boolean suffix) {\n        Arrays.sort(fragments, (s1, s2) -> s1.length() - s2.length());\n        int count = 0;\n        /*\n         * Simplify the array of prefixes or suffixes by removing all redundant elements.\n         * An element is redundant if there is a shorter prefix or suffix with the same characters.\n         */\n        nextBase:\n        for (String fragment : fragments) {\n            for (int i = count; --i >= 0; ) {\n                String base = fragments[i];\n                if (suffix ? fragment.endsWith(base) : fragment.startsWith(base)) {\n                    continue nextBase; // Skip this fragment\n                }\n            }\n            fragments[count++] = fragment;\n        }\n        return (fragments.length == count) ? fragments : Arrays.copyOf(fragments, count);\n    }\n\n    /**\n     * Returns the given array of patterns with path separator normalized to {@code '/'}.\n     * Null or empty patterns are ignored, and duplications are removed.\n     *\n     * @param patterns the patterns to normalize\n     * @param excludes whether the patterns are exclude patterns\n     * @return normalized patterns without null, empty or duplicated patterns\n     */\n    private static String[] normalizePatterns(final Collection<String> patterns, final boolean excludes) {\n        if (patterns == null || patterns.isEmpty()) {\n            return new String[0];\n        }\n        // TODO: use `LinkedHashSet.newLinkedHashSet(int)` instead with JDK19.\n        final var normalized = new LinkedHashSet<String>(patterns.size());\n        for (String pattern : patterns) {\n            if (pattern != null && !pattern.isEmpty()) {\n                if (pattern.indexOf(':') <= MAVEN_SYNTAX_THRESHOLD) {\n                    pattern = pattern.replace(File.separatorChar, '/');\n                    if (pattern.endsWith(\"/\")) {\n                        pattern += \"**\";\n                    }\n                    // Following are okay only when \"**\" means \"0 or more directories\".\n                    while (pattern.endsWith(\"/**/**\")) {\n                        pattern = pattern.substring(0, pattern.length() - 3);\n                    }\n                    while (pattern.startsWith(\"**/**/\")) {\n                        pattern = pattern.substring(3);\n                    }\n                    pattern = pattern.replace(\"/**/**/\", \"/**/\");\n                    pattern = pattern.replace(\"\\\\\", \"\\\\\\\\\")\n                            .replace(\"[\", \"\\\\[\")\n                            .replace(\"]\", \"\\\\]\")\n                            .replace(\"{\", \"\\\\{\")\n                            .replace(\"}\", \"\\\\}\");\n                    normalized.add(DEFAULT_SYNTAX + pattern);\n                    /*\n                     * If the pattern starts or ends with \"**\", Java GLOB expects a directory level at\n                     * that location while Maven seems to consider that \"**\" can mean \"no directory\".\n                     * Add another pattern for reproducing this effect.\n                     */\n                    addPatternsWithOneDirRemoved(normalized, pattern, 0);\n                } else {\n                    normalized.add(pattern);\n                }\n            }\n        }\n        return simplify(normalized, excludes);\n    }\n\n    /**\n     * Adds all variants of the given pattern with {@code **} removed.\n     * This is used for simulating the Maven behavior where {@code \"**} may match zero directory.\n     * Tests suggest that we need an explicit GLOB pattern with no {@code \"**\"} for matching an absence of directory.\n     *\n     * @param patterns where to add the derived patterns\n     * @param pattern  the pattern for which to add derived forms, without the \"glob:\" syntax prefix\n     * @param end      should be 0 (reserved for recursive invocations of this method)\n     */\n    private static void addPatternsWithOneDirRemoved(final Set<String> patterns, final String pattern, int end) {\n        final int length = pattern.length();\n        int start;\n        while ((start = pattern.indexOf(\"**\", end)) >= 0) {\n            end = start + 2; // 2 is the length of \"**\".\n            if (end < length) {\n                if (pattern.charAt(end) != '/') {\n                    continue;\n                }\n                if (start == 0) {\n                    end++; // Ommit the leading slash if there is nothing before it.\n                }\n            }\n            if (start > 0 && pattern.charAt(--start) != '/') {\n                continue;\n            }\n            String reduced = pattern.substring(0, start) + pattern.substring(end);\n            patterns.add(DEFAULT_SYNTAX + reduced);\n            addPatternsWithOneDirRemoved(patterns, reduced, start);\n        }\n    }\n\n    /**\n     * Applies some heuristic rules for simplifying the set of patterns,\n     * then returns the patterns as an array.\n     *\n     * @param patterns the patterns to simplify and return as an array\n     * @param excludes whether the patterns are exclude patterns\n     * @return the set content as an array, after simplification\n     */\n    private static String[] simplify(Set<String> patterns, boolean excludes) {\n        /*\n         * If the \"**\" pattern is present, it makes all other patterns useless.\n         * In the case of include patterns, an empty set means to include everything.\n         */\n        if (patterns.remove(\"**\")) {\n            patterns.clear();\n            if (excludes) {\n                patterns.add(\"**\");\n            }\n        }\n        return patterns.toArray(String[]::new);\n    }\n\n    /**\n     * Eventually adds the parent directory of the given patterns, without duplicated values.\n     * The patterns given to this method should have been normalized.\n     *\n     * @param patterns the normalized include or exclude patterns\n     * @param excludes whether the patterns are exclude patterns\n     * @return pattens of directories to include or exclude\n     */\n    private static String[] directoryPatterns(final String[] patterns, final boolean excludes) {\n        // TODO: use `LinkedHashSet.newLinkedHashSet(int)` instead with JDK19.\n        final var directories = new LinkedHashSet<String>(patterns.length);\n        for (String pattern : patterns) {\n            if (pattern.startsWith(DEFAULT_SYNTAX)) {\n                if (excludes) {\n                    if (pattern.endsWith(\"/**\")) {\n                        directories.add(pattern.substring(0, pattern.length() - 3));\n                    }\n                } else {\n                    int s = pattern.indexOf(':');\n                    if (pattern.regionMatches(++s, \"**/\", 0, 3)) {\n                        s = pattern.indexOf('/', s + 3);\n                        if (s < 0) {\n                            return new String[0]; // Pattern is \"**\", so we need to accept everything.\n                        }\n                        directories.add(pattern.substring(0, s));\n                    }\n                }\n            }\n        }\n        return simplify(directories, excludes);\n    }\n\n    /**\n     * Returns {@code true} if at least one pattern requires path to be relativized before to be matched.\n     *\n     * @param patterns include or exclude patterns\n     * @return whether at least one pattern require relativization\n     */\n    private static boolean needRelativize(String[] patterns) {\n        for (String pattern : patterns) {\n            if (!pattern.startsWith(DEFAULT_SYNTAX + \"**/\")) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * Creates the path matchers for the given patterns.\n     * The syntax (usually {@value #DEFAULT_SYNTAX}) must be specified for each pattern.\n     */\n    private static PathMatcher[] matchers(final FileSystem fs, final String[] patterns) {\n        final var matchers = new PathMatcher[patterns.length];\n        for (int i = 0; i < patterns.length; i++) {\n            matchers[i] = fs.getPathMatcher(patterns[i]);\n        }\n        return matchers;\n    }\n\n    /**\n     * {@return a potentially simpler matcher equivalent to this matcher}\n     */\n    @SuppressWarnings(\"checkstyle:MissingSwitchDefault\")\n    public PathMatcher simplify() {\n        if (!needRelativize && excludes.length == 0) {\n            switch (includes.length) {\n                case 0:\n                    return INCLUDES_ALL;\n                case 1:\n                    return includes[0];\n            }\n        }\n        return this;\n    }\n\n    /**\n     * Determines whether a path is selected.\n     * This is true if the given file matches an include pattern and no exclude pattern.\n     *\n     * @param path the pathname to test, must not be {@code null}\n     * @return {@code true} if the given path is selected, {@code false} otherwise\n     */\n    @Override\n    public boolean matches(Path path) {\n        if (needRelativize) {\n            path = baseDirectory.relativize(path);\n        }\n        return (includes.length == 0 || isMatched(path, includes))\n                && (excludes.length == 0 || !isMatched(path, excludes));\n    }\n\n    /**\n     * {@return whether the given file matches according to one of the given matchers}\n     */\n    private static boolean isMatched(Path path, PathMatcher[] matchers) {\n        for (PathMatcher matcher : matchers) {\n            if (matcher.matches(path)) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * Determines whether a directory could contain selected paths.\n     *\n     * @param directory the directory pathname to test, must not be {@code null}\n     * @return {@code true} if the given directory might contain selected paths, {@code false} if the\n     *         directory will definitively not contain selected paths\n     */\n    public boolean couldHoldSelected(Path directory) {\n        if (baseDirectory.equals(directory)) {\n            return true;\n        }\n        directory = baseDirectory.relativize(directory);\n        return (dirIncludes.length == 0 || isMatched(directory, dirIncludes))\n                && (dirExcludes.length == 0 || !isMatched(directory, dirExcludes));\n    }\n\n    /**\n     * Appends the elements of the given array in the given buffer.\n     * This is a helper method for {@link #toString()} implementations.\n     *\n     * @param buffer the buffer to add the elements to\n     * @param label label identifying the array of elements to add\n     * @param patterns the elements to append, or {@code null} if none\n     */\n    private static void append(StringBuilder buffer, String label, String[] patterns) {\n        buffer.append(label).append(\": [\");\n        if (patterns != null) {\n            for (int i = 0; i < patterns.length; i++) {\n                if (i != 0) {\n                    buffer.append(\", \");\n                }\n                buffer.append(patterns[i]);\n            }\n        }\n        buffer.append(']');\n    }\n\n    /**\n     * {@return a string representation for logging purposes}\n     */\n    @Override\n    public String toString() {\n        var buffer = new StringBuilder();\n        append(buffer, \"includes\", includePatterns);\n        append(buffer.append(\", \"), \"excludes\", excludePatterns);\n        return buffer.toString();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/Providers.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.plugin.compiler;\n\nimport org.apache.maven.api.Session;\nimport org.apache.maven.api.di.Named;\nimport org.apache.maven.api.di.Provides;\nimport org.apache.maven.api.services.ArtifactManager;\nimport org.apache.maven.api.services.MessageBuilderFactory;\nimport org.apache.maven.api.services.ProjectManager;\nimport org.apache.maven.api.services.ToolchainManager;\n\n/**\n * For providing instances to fields annotated with {@code @Inject} if the MOJO.\n */\n@Named\nclass Providers {\n\n    @Provides\n    static ToolchainManager toolchainManager(Session session) {\n        return session.getService(ToolchainManager.class);\n    }\n\n    @Provides\n    static ArtifactManager artifactManager(Session session) {\n        return session.getService(ArtifactManager.class);\n    }\n\n    @Provides\n    static ProjectManager projectManager(Session session) {\n        return session.getService(ProjectManager.class);\n    }\n\n    @Provides\n    static MessageBuilderFactory messageBuilderFactory(Session session) {\n        return session.getService(MessageBuilderFactory.class);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/SourceDirectory.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.plugin.compiler;\n\nimport javax.lang.model.SourceVersion;\nimport javax.tools.JavaFileObject;\n\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Objects;\nimport java.util.Optional;\nimport java.util.stream.Stream;\n\nimport org.apache.maven.api.Language;\nimport org.apache.maven.api.SourceRoot;\nimport org.apache.maven.api.Version;\n\n/**\n * A single root directory of source files, associated with module name and release version.\n * The module names are used when compiling a Module Source Hierarchy.\n * The release version is used for multi-versions JAR files.\n *\n * <p>This class contains also the output directory, because this information is needed\n * for determining whether a source file need to be recompiled.</p>\n *\n * @author Martin Desruisseaux\n */\nfinal class SourceDirectory {\n    /**\n     * The module-info filename, without extension.\n     */\n    static final String MODULE_INFO = \"module-info\";\n\n    /**\n     * File suffix of source code.\n     */\n    static final String JAVA_FILE_SUFFIX = \".java\";\n\n    /**\n     * File suffix of compiler classes.\n     */\n    static final String CLASS_FILE_SUFFIX = \".class\";\n\n    /**\n     * The root directory of all source files. Whether the path is relative or absolute depends on the paths given to\n     * the {@link #fromProject fromProject(…)} or {@link #fromPluginConfiguration fromPluginConfiguration(…)} methods.\n     * This class preserves the relative/absolute characteristic of the user-specified directories in order to behave\n     * as intended by users in operations such as {@linkplain Path#relativize relativization}, especially in regard of\n     * symbolic links. In practice, this path is often an absolute path.\n     */\n    final Path root;\n\n    /**\n     * Filter for selecting files below the {@linkplain #root} directory, or an empty list for the default filter.\n     * For the Java language, the default filter is {@code \"*.java\"}. The filters are used by {@link PathFilter}.\n     *\n     * <p>This field differs from {@link PathFilter#includes} in that it is specified in the {@code <source>} element,\n     * while the latter is specified in the plugin configuration. The filter specified here can be different for each\n     * source directory, while the plugin configuration applies to all source directories.</p>\n     *\n     * @see PathFilter#includes\n     */\n    final List<String> includes;\n\n    /**\n     * Filter for excluding files below the {@linkplain #root} directory, or an empty list for no exclusion.\n     * See {@link #includes} for the difference between this field and {@link PathFilter#excludes}.\n     *\n     * @see PathFilter#excludes\n     */\n    final List<String> excludes;\n\n    /**\n     * Kind of source files in this directory. This is usually {@link JavaFileObject.Kind#SOURCE}.\n     * This information is used for building a default include filter such as {@code \"glob:*.java}\n     * if the user didn't specified an explicit filter. The default include filter may change for\n     * each root directory.\n     */\n    final JavaFileObject.Kind fileKind;\n\n    /**\n     * Name of the module for which source directories are provided, or {@code null} if none.\n     * This name is supplied to the constructor instead of parsed from {@code module-info.java}\n     * file because the latter may not exist in this directory. For example, in a multi-release\n     * project, the module-info may be declared in another directory for the base version.\n     *\n     * @see #getModuleInfo()\n     */\n    final String moduleName;\n\n    /**\n     * Path to the {@code module-info} file, or {@code null} if none. This flag is set when\n     * walking through the directory content. This is related, but not strictly equivalent,\n     * to whether the {@link #moduleName} is non-null.\n     *\n     * @see #getModuleInfo()\n     */\n    private Path moduleInfo;\n\n    /**\n     * The Java release for which source directories are provided, or {@code null} for the default release.\n     * This is used for multi-versions JAR files. Note that a non-null value does not mean that the classes\n     * will be put in a {@code META-INF/versions/} subdirectory, because this version may be the base version.\n     *\n     * @see #getSpecificVersion()\n     */\n    final SourceVersion release;\n\n    /**\n     * Whether the {@linkplain #release} is a version other than the base version.\n     * This flag is initially unknown (conservatively assumed false) and is set after the base version is known.\n     * Note that a null {@linkplain #release} is considered more recent than all non-null releases (because null\n     * stands for the default, which is usually the runtime version), and therefore is considered versioned if\n     * some non-null releases exist.\n     *\n     * @see #completeIfVersioned(SourceVersion)\n     */\n    private boolean isVersioned;\n\n    /**\n     * The directory where to store the compilation results.\n     * This is the MOJO output directory with sub-directories appended according the following rules, in that order:\n     *\n     * <ol>\n     *   <li>If {@link #isVersioned} is {@code true}, then the relative part of the path starts with\n     *       {@code \"META-INF/versions/<n>\"} where {@code <n>} is the release number.</li>\n     *   <li>If {@link #moduleName} is non-null, then the module name is appended.</li>\n     * </ol>\n     *\n     * @see #getOutputDirectory()\n     */\n    private Path outputDirectory;\n\n    /**\n     * Kind of output files in the output directory.\n     * This is usually {@link JavaFileObject.Kind#CLASS}.\n     */\n    final JavaFileObject.Kind outputFileKind;\n\n    /**\n     * Creates a new source directory.\n     *\n     * @param root the root directory of all source files\n     * @param includes patterns for selecting files below the root directory, or an empty list for the default filter\n     * @param excludes patterns for excluding files below the root directory, or an empty list for no exclusion\n     * @param fileKind kind of source files in this directory (usually {@code SOURCE})\n     * @param moduleName name of the module for which source directories are provided, or {@code null} if none\n     * @param release Java release for which source directories are provided, or {@code null} for the default release\n     * @param outputDirectory the directory where to store the compilation results\n     * @param outputFileKind Kind of output files in the output directory (usually {@ codeCLASS})\n     */\n    @SuppressWarnings(\"checkstyle:ParameterNumber\")\n    private SourceDirectory(\n            Path root,\n            List<String> includes,\n            List<String> excludes,\n            JavaFileObject.Kind fileKind,\n            String moduleName,\n            SourceVersion release,\n            Path outputDirectory,\n            JavaFileObject.Kind outputFileKind) {\n        this.root = Objects.requireNonNull(root);\n        this.includes = Objects.requireNonNull(includes);\n        this.excludes = Objects.requireNonNull(excludes);\n        this.fileKind = Objects.requireNonNull(fileKind);\n        this.moduleName = moduleName;\n        this.release = release;\n        if (moduleName != null) {\n            outputDirectory = outputDirectory.resolve(moduleName);\n        }\n        this.outputDirectory = outputDirectory;\n        this.outputFileKind = outputFileKind;\n    }\n\n    /**\n     * Potentially adds the {@code META-INF/versions/} part of the path to the output directory.\n     * This method can be invoked only after the base version has been determined, which happens\n     * after all other source directories have been built.\n     *\n     * @param baseVersion the Java release target by the non-versioned classes\n     */\n    private void completeIfVersioned(SourceVersion baseVersion) {\n        @SuppressWarnings(\"LocalVariableHidesMemberVariable\")\n        SourceVersion release = this.release;\n        isVersioned = (release != baseVersion);\n        if (isVersioned) {\n            if (release == null) {\n                release = SourceVersion.latestSupported();\n                // `this.release` intentionally left to null.\n            }\n            var hierarchy = (moduleName != null) ? DirectoryHierarchy.MODULE_SOURCE : DirectoryHierarchy.PACKAGE;\n            outputDirectory = hierarchy.outputDirectoryForReleases(outputDirectory, release);\n        }\n    }\n\n    /**\n     * {@return the target version as an object from the Java tools API}\n     *\n     * @param root the source directory for which to get the target version\n     * @throws UnsupportedVersionException if the version string cannot be parsed\n     */\n    static Optional<SourceVersion> targetVersion(final SourceRoot root) {\n        return root.targetVersion().map(Version::toString).map(SourceDirectory::parse);\n    }\n\n    /**\n     * Parses the given version string.\n     * This method parses the version with {@link Runtime.Version#parse(String)}.\n     * Therefore, for Java 8, the version shall be \"8\", not \"1.8\".\n     *\n     * @param version the version to parse, or null or empty if none\n     * @return the parsed version, or {@code null} if the given string was null or empty\n     * @throws UnsupportedVersionException if the version string cannot be parsed\n     */\n    static SourceVersion parse(final String version) {\n        if (version == null || version.isBlank()) {\n            return null;\n        }\n        try {\n            var parsed = Runtime.Version.parse(version);\n            return SourceVersion.valueOf(\"RELEASE_\" + parsed.feature());\n            // TODO: Replace by return SourceVersion.valueOf(v) after upgrade to Java 18.\n        } catch (IllegalArgumentException e) {\n            throw new UnsupportedVersionException(\"Illegal version number: \\\"\" + version + '\"', e);\n        }\n    }\n\n    /**\n     * Gets the list of source directories from the project manager.\n     * The returned list includes only the directories that exist.\n     *\n     * @param compileSourceRoots the root paths to source files\n     * @param defaultRelease the release to use if the {@code <source>} element provides none, or {@code null}\n     * @param outputDirectory the directory where to store the compilation results\n     * @return the given list of paths wrapped as source directory objects\n     */\n    static List<SourceDirectory> fromProject(\n            Stream<SourceRoot> compileSourceRoots, String defaultRelease, Path outputDirectory) {\n        var release = parse(defaultRelease); // May be null.\n        var roots = new ArrayList<SourceDirectory>();\n        compileSourceRoots.forEach((SourceRoot source) -> {\n            Path directory = source.directory();\n            if (Files.exists(directory)) {\n                var fileKind = JavaFileObject.Kind.OTHER;\n                var outputFileKind = JavaFileObject.Kind.OTHER;\n                if (Language.JAVA_FAMILY.equals(source.language())) {\n                    fileKind = JavaFileObject.Kind.SOURCE;\n                    outputFileKind = JavaFileObject.Kind.CLASS;\n                }\n                roots.add(new SourceDirectory(\n                        directory,\n                        source.includes(),\n                        source.excludes(),\n                        fileKind,\n                        source.module().orElse(null),\n                        targetVersion(source).orElse(release),\n                        outputDirectory,\n                        outputFileKind));\n            }\n        });\n        roots.stream()\n                .map((dir) -> dir.release)\n                .filter(Objects::nonNull)\n                .min(SourceVersion::compareTo)\n                .ifPresent((baseVersion) -> roots.forEach((dir) -> dir.completeIfVersioned(baseVersion)));\n        return roots;\n    }\n\n    /**\n     * Converts the given list of paths to a list of source directories.\n     * The returned list includes only the directories that exist.\n     * Used only when the compiler plugin is configured with the {@code compileSourceRoots} option.\n     *\n     * @param compileSourceRoots the root paths to source files\n     * @param moduleName name of the module for which source directories are provided, or {@code null} if none\n     * @param defaultRelease the release to use, or {@code null} of unspecified\n     * @param outputDirectory the directory where to store the compilation results\n     * @return the given list of paths wrapped as source directory objects\n     */\n    static List<SourceDirectory> fromPluginConfiguration(\n            List<String> compileSourceRoots, String moduleName, String defaultRelease, Path outputDirectory) {\n        var release = parse(defaultRelease); // May be null.\n        var roots = new ArrayList<SourceDirectory>(compileSourceRoots.size());\n        for (String file : compileSourceRoots) {\n            Path directory = Path.of(file);\n            if (Files.exists(directory)) {\n                roots.add(new SourceDirectory(\n                        directory,\n                        List.of(),\n                        List.of(),\n                        JavaFileObject.Kind.SOURCE,\n                        moduleName,\n                        release,\n                        outputDirectory,\n                        JavaFileObject.Kind.CLASS));\n            }\n        }\n        return roots;\n    }\n\n    /**\n     * Returns whether the given file is a {@code module-info.java} file.\n     * TODO: we could make this method non-static and verify that the given\n     * file is in the root of this directory.\n     */\n    static boolean isModuleInfoSource(Path file) {\n        return (MODULE_INFO + JAVA_FILE_SUFFIX).equals(file.getFileName().toString());\n    }\n\n    /**\n     * Invoked for each source files in this directory.\n     */\n    void visit(Path sourceFile) {\n        if (isModuleInfoSource(sourceFile)) {\n            // Paranoiac check: only one file should exist, but if many, keep the one closest to the root.\n            if (moduleInfo == null || moduleInfo.getNameCount() >= sourceFile.getNameCount()) {\n                moduleInfo = sourceFile;\n            }\n        }\n    }\n\n    /**\n     * Path to the {@code module-info.java} source file, or empty if none.\n     * This information is accurate only after {@link PathFilter} finished\n     * to walk through all source files in a directory.\n     */\n    public Optional<Path> getModuleInfo() {\n        return Optional.ofNullable(moduleInfo);\n    }\n\n    /**\n     * {@return the Java version of the sources in this directory if different than the base version}\n     * The value returned by this method is related to the {@code META-INF/versions/} subdirectory in\n     * the path returned by {@link #getOutputDirectory()}. If this method returns an empty value, then\n     * there is no such subdirectory (which doesn't mean that the user did not specified a Java version).\n     * If non-empty, the returned value is the value of <var>n</var> in {@code META-INF/versions/n}.\n     */\n    public Optional<SourceVersion> getSpecificVersion() {\n        return Optional.ofNullable(isVersioned ? release : null);\n    }\n\n    /**\n     * {@return the directory where to store the compilation results}\n     * This is the <abbr>MOJO</abbr> output directory potentially completed with\n     * sub-directories for module name and {@code META-INF/versions} versioning.\n     */\n    public Path getOutputDirectory() {\n        return outputDirectory;\n    }\n\n    /**\n     * Compares the given object with this source directory for equality.\n     *\n     * @param obj the object to compare\n     * @return whether the two objects have the same path, module name and release version\n     */\n    @Override\n    public boolean equals(Object obj) {\n        if (obj instanceof SourceDirectory other) {\n            return root.equals(other.root)\n                    && includes.equals(other.includes)\n                    && excludes.equals(other.excludes)\n                    && fileKind == other.fileKind\n                    && Objects.equals(moduleName, other.moduleName)\n                    && release == other.release\n                    && outputDirectory.equals(other.outputDirectory)\n                    && outputFileKind == other.outputFileKind;\n        }\n        return false;\n    }\n\n    /**\n     * {@return a hash code value for this root directory}\n     */\n    @Override\n    public int hashCode() {\n        return Objects.hash(root, moduleName, release);\n    }\n\n    /**\n     * {@return a string representation of this root directory for debugging purposes}\n     */\n    @Override\n    public String toString() {\n        var sb = new StringBuilder(100).append('\"').append(root).append('\"');\n        if (moduleName != null) {\n            sb.append(\" for module \\\"\").append(moduleName).append('\"');\n        }\n        if (release != null) {\n            sb.append(\" on Java release \").append(release);\n        }\n        return sb.toString();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/SourceFile.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.plugin.compiler;\n\nimport java.nio.file.Path;\nimport java.nio.file.attribute.BasicFileAttributes;\n\n/**\n * A single source file, associated with the root directory from which it belong.\n * This class contains also the output file, because this information is needed\n * for determining whether a source file need to be recompiled.\n *\n * @author Martin Desruisseaux\n */\nfinal class SourceFile {\n    /**\n     * The root directory which was walked for obtaining this file.\n     */\n    final SourceDirectory directory;\n\n    /**\n     * The source file found by walking under the directory.\n     * This path is already resolved relative to {@link SourceDirectory#root}.\n     */\n    final Path file;\n\n    /**\n     * The time this file object was last modified, in milliseconds since January 1, 1970.\n     */\n    final long lastModified;\n\n    /**\n     * Whether this source has been flagged as new or modified since the last build.\n     *\n     * @see IncrementalBuildHelper#inputFileTreeChanges\n     */\n    boolean isNewOrModified;\n\n    /**\n     * Whether to ignore this file for incremental build calculation.\n     * This flag is set to {@code true} if this file matches a filter\n     * specified by {@link AbstractCompilerMojo#getIncrementalExcludes()}.\n     *\n     * <p>Note that a value of {@code true} should not prevent the {@link #isNewOrModified} flag to be\n     * set to {@code true} if a modification is detected, because we want this file to be included in\n     * compilation unit if a compilation is decided for another reason than a change of this file.</p>\n     *\n     * @see AbstractCompilerMojo#getIncrementalExcludes()\n     */\n    final boolean ignoreModification;\n\n    /**\n     * The path of the {@code .class} file, created when first requested.\n     *\n     * @see #getOutputFile()\n     */\n    private Path outputFile;\n\n    /**\n     * Creates a new source file.\n     *\n     * @param directory the root directory where the file come from\n     * @param file a source file found by walking under the directory\n     * @param attrs the source file attributes\n     * @param ignoreModification whether to ignore this file for incremental build calculation\n     */\n    SourceFile(SourceDirectory directory, Path file, BasicFileAttributes attrs, boolean ignoreModification) {\n        this.directory = directory;\n        this.file = file;\n        this.lastModified = attrs.lastModifiedTime().toMillis();\n        this.ignoreModification = ignoreModification;\n        directory.visit(file);\n    }\n\n    /**\n     * {@return whether the output file is the same as the one that we would infer from heuristic rules}\n     *\n     * <p>TODO: this is not yet implemented. We need to clarify how to get the output file information\n     * from the compiler, maybe via the {@link javax.tools.JavaFileManager#getFileForOutput} method.\n     * Then, {@link #getOutputFile} should compare that value with the inferred one and set a flag.</p>\n     */\n    boolean isStandardOutputFile() {\n        // The constants below must match the ones in `IncrementalBuild.SourceInfo`.\n        return SourceDirectory.JAVA_FILE_SUFFIX.equals(directory.fileKind.extension)\n                && SourceDirectory.CLASS_FILE_SUFFIX.equals(directory.outputFileKind.extension);\n    }\n\n    /**\n     * Returns the file resulting from the compilation of this source file. If the output file has been\n     * {@linkplain javax.tools.JavaFileManager#getFileForOutput obtained from the compiler}, that value\n     * if returned. Otherwise, output file is inferred using {@linkplain #toOutputFile heuristic rules}.\n     *\n     * @return path to the output file\n     */\n    Path getOutputFile() {\n        if (outputFile == null) {\n            outputFile = toOutputFile(\n                    directory.root,\n                    directory.getOutputDirectory(),\n                    file,\n                    directory.fileKind.extension,\n                    directory.outputFileKind.extension);\n            /*\n             * TODO: compare with the file given by the compiler (if we can get that information)\n             * and set a `isStandardOutputFile` flag with the comparison result.\n             */\n        }\n        return outputFile;\n    }\n\n    /**\n     * Infers the path to the output file using heuristic rules.\n     * If the extension of the file is the one of {@linkplain SourceDirectory#fileKind source file kind}\n     * (usually {@code \".java\"}), then it is replaced by the extension specified in {@code outputFileKind}.\n     * Otherwise the extension is left unmodified. Then, the path is made relative to the output directory.\n     *\n     * @param sourceDirectory root directory of the source file\n     * @param outputDirectory output directory of the compiled file\n     * @param file path to the source file\n     * @param extension expected extension of the source file, leading dot included\n     * @param outext extension of the output file, leading dot included\n     * @return path to the target file\n     */\n    static Path toOutputFile(Path sourceDirectory, Path outputDirectory, Path file, String extension, String outext) {\n        Path output = sourceDirectory.relativize(file);\n        String filename = file.getFileName().toString();\n        if (filename.endsWith(extension)) {\n            filename = filename.substring(0, filename.length() - extension.length());\n            filename = filename.concat(outext);\n            output = output.resolveSibling(filename);\n        }\n        return outputDirectory.resolve(output);\n    }\n\n    /**\n     * Compares the given object with this source file for equality.\n     * This method compares only the file path. Metadata such as last modification time are ignored.\n     *\n     * @param obj the object to compare\n     * @return whether the two objects have the same path and attributes\n     */\n    @Override\n    public boolean equals(Object obj) {\n        if (obj instanceof SourceFile other) {\n            return file.equals(other.file) && directory.equals(other.directory);\n        }\n        return false;\n    }\n\n    /**\n     * {@return a hash code value for this file}\n     */\n    @Override\n    public int hashCode() {\n        return directory.hashCode() + 7 * file.hashCode();\n    }\n\n    /**\n     * {@return a string representation of this source file for debugging purposes}\n     * This string representation is shown in Maven output if debug logs are enabled.\n     */\n    @Override\n    public String toString() {\n        return file.toString();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/SourcePathType.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.plugin.compiler;\n\nimport java.io.File;\nimport java.nio.file.Path;\nimport java.util.Objects;\nimport java.util.Optional;\nimport java.util.StringJoiner;\n\nimport org.apache.maven.api.PathType;\n\n/**\n * Key for declaring source files as an implementation convenience.\n * This type is not declared in {@link JavaPathType} because it is not about dependencies.\n *\n * @author Martin Desruisseaux\n */\nfinal class SourcePathType implements PathType {\n    /**\n     * The singleton instance for non-modular source paths.\n     */\n    private static final SourcePathType SOURCE_PATH = new SourcePathType(null);\n\n    /**\n     * The name of the module, or {@code null} if none.\n     */\n    private final String moduleName;\n\n    /**\n     * Creates a new path type for the given module.\n     *\n     * @param moduleName the name of the module, or {@code null} if none\n     */\n    private SourcePathType(String moduleName) {\n        this.moduleName = moduleName;\n    }\n\n    /**\n     * Returns the source path type for the given module name.\n     *\n     * @param moduleName the name of the module, or {@code null} if none\n     * @return the source path type\n     */\n    static SourcePathType valueOf(String moduleName) {\n        return (moduleName == null || moduleName.isBlank()) ? SOURCE_PATH : new SourcePathType(moduleName);\n    }\n\n    /**\n     * Returns the unique name of this path type, including the module to patch if any.\n     *\n     * @return the name of this path type, including module name\n     */\n    @Override\n    public String id() {\n        String id = name();\n        if (moduleName != null) {\n            id = id + ':' + moduleName;\n        }\n        return id;\n    }\n\n    /**\n     * Returns the programmatic name of this path type, without module name.\n     *\n     * @return the programmatic name of this path type\n     */\n    @Override\n    public String name() {\n        return (moduleName == null) ? \"SOURCE_PATH\" : \"MODULE_SOURCE_PATH\";\n    }\n\n    /**\n     * Returns the name of the tool option for this path.\n     * It does not include the module name.\n     */\n    @Override\n    public Optional<String> option() {\n        return Optional.of((moduleName == null) ? \"--source-path\" : \"--module-source-path\");\n    }\n\n    /**\n     * {@return the option followed by a string representation of the given path elements}\n     *\n     * @param paths the path elements to format\n     */\n    @Override\n    public String[] option(Iterable<? extends Path> paths) {\n        var joiner = new StringJoiner(File.pathSeparator, (moduleName != null) ? moduleName + '=' : \"\", \"\");\n        paths.forEach((path) -> joiner.add(path.toString()));\n        return new String[] {option().get(), joiner.toString()};\n    }\n\n    /**\n     * {@return a hash code value based on the module name}\n     */\n    @Override\n    public int hashCode() {\n        return Objects.hashCode(moduleName) + 17;\n    }\n\n    /**\n     * {@return whether the given object represents the same source path as this object}\n     */\n    @Override\n    public boolean equals(Object obj) {\n        return (obj instanceof SourcePathType) && Objects.equals(moduleName, ((SourcePathType) obj).moduleName);\n    }\n\n    /**\n     * {@return a string representation for debugging purposes}\n     */\n    @Override\n    public String toString() {\n        return getClass().getSimpleName() + '[' + id() + ']';\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/SourcesForRelease.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.plugin.compiler;\n\nimport javax.lang.model.SourceVersion;\n\nimport java.io.Closeable;\nimport java.io.IOException;\nimport java.nio.file.Path;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.LinkedHashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\n\nimport org.apache.maven.api.PathType;\n\n/**\n * Source files for a specific Java release. Instances of {@code SourcesForRelease} are created from\n * a list of {@link SourceFile} after the sources have been filtered according include and exclude filters.\n *\n * @author Martin Desruisseaux\n */\nfinal class SourcesForRelease implements Closeable {\n    /**\n     * The release for this set of sources, or {@code null} if the user did not specified a release.\n     *\n     * @see #getReleaseString()\n     * @see SourceDirectory#release\n     */\n    final SourceVersion release;\n\n    /**\n     * All source files. This is the union of all {@link SourceFile#file} for this {@linkplain #release}.\n     *\n     * @see SourceFile#file\n     */\n    final List<Path> files;\n\n    /**\n     * All source directories that are part of this compilation unit, grouped by module names.\n     * The keys in the map are the module names, with the empty string standing for no module.\n     * Values are the union of all {@link SourceDirectory#root} for this {@linkplain #release}.\n     *\n     * @see SourceDirectory#root\n     */\n    final Map<String, Set<Path>> roots;\n\n    /**\n     * The directories that contains a {@code module-info.java} file. If the set of source files\n     * is for a Java release different than the base release, or if it is for the test sources,\n     * then a non-empty map means that some modules overwrite {@code module-info.class}.\n     */\n    private final Map<SourceDirectory, ModuleInfoOverwrite> moduleInfos;\n\n    /**\n     * Last directory added to the {@link #roots} map. This is a small optimization for reducing\n     * the number of accesses to the map. In most cases, only one element will be written there.\n     */\n    private SourceDirectory lastDirectoryAdded;\n\n    /**\n     * Snapshot of {@link ToolExecutor#dependencies}.\n     * This information is saved in case a {@code target/javac.args} debug file needs to be written.\n     */\n    Map<PathType, Collection<Path>> dependencySnapshot;\n\n    /**\n     * The output directory for the release. This is either the base output directory or a sub-directory\n     * in {@code META-INF/versions/}. This field is not used by this class, but made available for making\n     * easier to write the {@code target/javac.args} debug file.\n     */\n    Path outputForRelease;\n\n    /**\n     * Creates an initially empty instance for the given Java release.\n     *\n     * @param release the release for this set of sources, or {@code null} if the user did not specified a release\n     */\n    SourcesForRelease(SourceVersion release) {\n        this.release = release;\n        files = new ArrayList<>();\n        roots = new LinkedHashMap<>();\n        moduleInfos = new LinkedHashMap<>();\n    }\n\n    /**\n     * Returns the release as a string suitable for the {@code --release} compiler option.\n     *\n     * @return the release number as a string, or {@code null} if none\n     */\n    String getReleaseString() {\n        if (release == null) {\n            return null;\n        }\n        var version = release.name();\n        return version.substring(version.lastIndexOf('_') + 1);\n    }\n\n    /**\n     * Adds the given source file to this collection of source files.\n     * The value of {@code source.directory.release}, if not null, must be equal to {@link #release}.\n     *\n     * @param source the source file to add.\n     */\n    void add(SourceFile source) {\n        var directory = source.directory;\n        if (lastDirectoryAdded != directory) {\n            lastDirectoryAdded = directory;\n            String moduleName = directory.moduleName;\n            if (moduleName == null || moduleName.isBlank()) {\n                moduleName = \"\";\n            }\n            roots.get(moduleName).add(directory.root);\n            directory.getModuleInfo().ifPresent((path) -> moduleInfos.put(directory, null));\n        }\n        files.add(source.file);\n    }\n\n    /**\n     * Restores the hidden {@code module-info.class} files to their original names.\n     */\n    @Override\n    public void close() throws IOException {\n        IOException error = null;\n        for (Map.Entry<SourceDirectory, ModuleInfoOverwrite> entry : moduleInfos.entrySet()) {\n            ModuleInfoOverwrite mo = entry.getValue();\n            if (mo != null) {\n                entry.setValue(null);\n                try {\n                    mo.restore();\n                } catch (IOException e) {\n                    if (error == null) {\n                        error = e;\n                    } else {\n                        error.addSuppressed(e);\n                    }\n                }\n            }\n        }\n        if (error != null) {\n            throw error;\n        }\n    }\n\n    /**\n     * {@return a string representation for debugging purposes}\n     */\n    @Override\n    public String toString() {\n        var sb = new StringBuilder(getClass().getSimpleName()).append('[');\n        if (release != null) {\n            sb.append(release).append(\": \");\n        }\n        return sb.append(files.size()).append(\" files]\").toString();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.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.plugin.compiler;\n\nimport javax.tools.DiagnosticListener;\nimport javax.tools.JavaFileObject;\nimport javax.tools.OptionChecker;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Set;\n\nimport org.apache.maven.api.PathScope;\nimport org.apache.maven.api.annotations.Nonnull;\nimport org.apache.maven.api.annotations.Nullable;\nimport org.apache.maven.api.plugin.MojoException;\nimport org.apache.maven.api.plugin.annotations.Mojo;\nimport org.apache.maven.api.plugin.annotations.Parameter;\nimport org.apache.maven.api.services.MessageBuilder;\n\nimport static org.apache.maven.plugin.compiler.SourceDirectory.CLASS_FILE_SUFFIX;\nimport static org.apache.maven.plugin.compiler.SourceDirectory.JAVA_FILE_SUFFIX;\nimport static org.apache.maven.plugin.compiler.SourceDirectory.MODULE_INFO;\n\n/**\n * Compiles application test sources.\n * Each instance shall be used only once, then discarded.\n *\n * @author <a href=\"mailto:jason@maven.org\">Jason van Zyl</a>\n * @author Martin Desruisseaux\n * @see <a href=\"https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html\">javac Command</a>\n * @since 2.0\n */\n@Mojo(name = \"testCompile\", defaultPhase = \"test-compile\")\npublic class TestCompilerMojo extends AbstractCompilerMojo {\n    /**\n     * Whether to bypass compilation of test sources.\n     * Its use is not recommended, but quite convenient on occasion.\n     *\n     * @see CompilerMojo#skipMain\n     */\n    @Parameter(property = \"maven.test.skip\")\n    protected boolean skip;\n\n    /**\n     * Specify where to place generated source files created by annotation processing.\n     *\n     * @see CompilerMojo#generatedSourcesDirectory\n     * @since 2.2\n     */\n    @Parameter(defaultValue = \"${project.build.directory}/generated-test-sources/test-annotations\")\n    protected Path generatedTestSourcesDirectory;\n\n    /**\n     * A set of inclusion filters for the compiler.\n     *\n     * @see CompilerMojo#includes\n     */\n    @Parameter\n    protected Set<String> testIncludes;\n\n    /**\n     * A set of exclusion filters for the compiler.\n     *\n     * @see CompilerMojo#excludes\n     */\n    @Parameter\n    protected Set<String> testExcludes;\n\n    /**\n     * A set of exclusion filters for the incremental calculation.\n     * Updated files, if excluded by this filter, will not cause the project to be rebuilt.\n     *\n     * @see CompilerMojo#incrementalExcludes\n     * @since 3.11\n     */\n    @Parameter\n    protected Set<String> testIncrementalExcludes;\n\n    /**\n     * The {@code --source} argument for the test Java compiler.\n     *\n     * @see CompilerMojo#source\n     * @since 2.1\n     */\n    @Parameter(property = \"maven.compiler.testSource\")\n    protected String testSource;\n\n    /**\n     * The {@code --target} argument for the test Java compiler.\n     *\n     * @see CompilerMojo#target\n     * @since 2.1\n     */\n    @Parameter(property = \"maven.compiler.testTarget\")\n    protected String testTarget;\n\n    /**\n     * the {@code --release} argument for the test Java compiler\n     *\n     * @see CompilerMojo#release\n     * @since 3.6\n     */\n    @Parameter(property = \"maven.compiler.testRelease\")\n    protected String testRelease;\n\n    /**\n     * The arguments to be passed to the test compiler.\n     * If this parameter is specified, it replaces {@link #compilerArgs}.\n     * Otherwise, the {@code compilerArgs} parameter is used.\n     *\n     * @see CompilerMojo#compilerArgs\n     * @since 4.0.0\n     */\n    @Parameter\n    protected List<String> testCompilerArgs;\n\n    /**\n     * The arguments to be passed to test compiler.\n     *\n     * @deprecated Replaced by {@link #testCompilerArgs} for consistency with the main phase.\n     *\n     * @since 2.1\n     */\n    @Parameter\n    @Deprecated(since = \"4.0.0\")\n    protected Map<String, String> testCompilerArguments;\n\n    /**\n     * The single argument string to be passed to the test compiler.\n     * If this parameter is specified, it replaces {@link #compilerArgument}.\n     * Otherwise, the {@code compilerArgument} parameter is used.\n     *\n     * @deprecated Use {@link #testCompilerArgs} instead.\n     *\n     * @see CompilerMojo#compilerArgument\n     * @since 2.1\n     */\n    @Parameter\n    @Deprecated(since = \"4.0.0\")\n    protected String testCompilerArgument;\n\n    /**\n     * The directory where compiled test classes go.\n     * This parameter should only be modified in special cases.\n     * See the {@link CompilerMojo#outputDirectory} for more information.\n     *\n     * @see CompilerMojo#outputDirectory\n     * @see #getOutputDirectory()\n     */\n    @Parameter(defaultValue = \"${project.build.testOutputDirectory}\", required = true)\n    protected Path outputDirectory;\n\n    /**\n     * The output directory of the main classes.\n     * This directory will be added to the class-path or module-path.\n     * Its value should be the same as {@link CompilerMojo#outputDirectory}.\n     *\n     * @see CompilerMojo#outputDirectory\n     */\n    @Parameter(defaultValue = \"${project.build.outputDirectory}\", required = true, readonly = true)\n    protected Path mainOutputDirectory;\n\n    /**\n     * Whether to place the main classes on the module path when {@code module-info} is present.\n     * When {@code false}, always places the main classes on the class path.\n     * Dependencies are also placed on the class-path, unless their type is {@code module-jar}.\n     *\n     * @since 3.11\n     *\n     * @deprecated Use {@code \"claspath-jar\"} dependency type instead, and avoid {@code module-info.java} in tests.\n     */\n    @Deprecated(since = \"4.0.0\")\n    @Parameter(defaultValue = \"true\")\n    protected boolean useModulePath = true;\n\n    /**\n     * Whether a {@code module-info.java} file is defined in the test sources.\n     * In such case, it has precedence over the {@code module-info.java} in main sources.\n     * This is defined for compatibility with Maven 3, but not recommended.\n     *\n     * <p>This field exists in this class only for transferring this information\n     * to {@link ToolExecutorForTest#hasTestModuleInfo}, which is the class that\n     * needs this information.</p>\n     *\n     * @deprecated Avoid {@code module-info.java} in tests.\n     */\n    @Deprecated(since = \"4.0.0\")\n    transient boolean hasTestModuleInfo;\n\n    /**\n     * Whether a {@code module-info.java} file is defined in the main sources.\n     */\n    private transient boolean hasMainModuleInfo;\n\n    /**\n     * The file where to dump the command-line when debug is activated or when the compilation failed.\n     * For example, if the value is {@code \"javac-test\"}, then the Java compiler can be launched\n     * from the command-line by typing {@code javac @target/javac-test.args}.\n     * The debug file will contain the compiler options together with the list of source files to compile.\n     *\n     * <p>By default, this debug file is written only if the compilation of test code failed.\n     * The writing of the debug files can be forced by setting the {@link #verbose} flag to {@code true}\n     * or by specifying the {@code --verbose} option to Maven on the command-line.</p>\n     *\n     * @see CompilerMojo#debugFileName\n     * @since 3.10.0\n     */\n    @Parameter(defaultValue = \"javac-test.args\")\n    protected String debugFileName;\n\n    /**\n     * Creates a new compiler <abbr>MOJO</abbr> for the tests.\n     */\n    public TestCompilerMojo() {\n        super(PathScope.TEST_COMPILE);\n    }\n\n    /**\n     * Runs the Java compiler on the test source code.\n     * If {@link #skip} is {@code true}, then this method logs a message and does nothing else.\n     * Otherwise, this method executes the steps described in the method of the parent class.\n     *\n     * @throws MojoException if the compiler cannot be run.\n     */\n    @Override\n    public void execute() throws MojoException {\n        if (skip) {\n            logger.info(\"Not compiling test sources\");\n            return;\n        }\n        super.execute();\n    }\n\n    /**\n     * Parses the parameters declared in the <abbr>MOJO</abbr>.\n     *\n     * @param  compiler  the tools to use for verifying the validity of options\n     * @return the options after validation\n     */\n    @Override\n    @SuppressWarnings(\"deprecation\")\n    public Options parseParameters(final OptionChecker compiler) {\n        Options configuration = super.parseParameters(compiler);\n        configuration.addUnchecked(isAbsent(testCompilerArgs) ? compilerArgs : testCompilerArgs);\n        if (testCompilerArguments != null) {\n            for (Map.Entry<String, String> entry : testCompilerArguments.entrySet()) {\n                configuration.addUnchecked(List.of(entry.getKey(), entry.getValue()));\n            }\n        }\n        configuration.addUnchecked(testCompilerArgument == null ? compilerArgument : testCompilerArgument);\n        return configuration;\n    }\n\n    /**\n     * {@return the path where to place generated source files created by annotation processing on the test classes}\n     */\n    @Nullable\n    @Override\n    protected Path getGeneratedSourcesDirectory() {\n        return generatedTestSourcesDirectory;\n    }\n\n    /**\n     * {@return the inclusion filters for the compiler, or an empty set for all Java source files}\n     */\n    @Override\n    protected Set<String> getIncludes() {\n        return (testIncludes != null) ? testIncludes : Set.of();\n    }\n\n    /**\n     * {@return the exclusion filters for the compiler, or an empty set if none}\n     */\n    @Override\n    protected Set<String> getExcludes() {\n        return (testExcludes != null) ? testExcludes : Set.of();\n    }\n\n    /**\n     * {@return the exclusion filters for the incremental calculation, or an empty set if none}\n     */\n    @Override\n    protected Set<String> getIncrementalExcludes() {\n        return (testIncrementalExcludes != null) ? testIncrementalExcludes : Set.of();\n    }\n\n    /**\n     * If a different source version has been specified for the tests, returns that version.\n     * Otherwise returns the same source version as the main code.\n     *\n     * @return the {@code --source} argument for the Java compiler\n     */\n    @Nullable\n    @Override\n    protected String getSource() {\n        return testSource == null ? source : testSource;\n    }\n\n    /**\n     * If a different target version has been specified for the tests, returns that version.\n     * Otherwise returns the same target version as the main code.\n     *\n     * @return the {@code --target} argument for the Java compiler\n     */\n    @Nullable\n    @Override\n    protected String getTarget() {\n        return testTarget == null ? target : testTarget;\n    }\n\n    /**\n     * If a different release version has been specified for the tests, returns that version.\n     * Otherwise returns the same release version as the main code.\n     *\n     * @return the {@code --release} argument for the Java compiler\n     */\n    @Nullable\n    @Override\n    protected String getRelease() {\n        return testRelease == null ? release : testRelease;\n    }\n\n    /**\n     * {@return the destination directory for test class files}\n     */\n    @Nonnull\n    @Override\n    protected Path getOutputDirectory() {\n        return outputDirectory;\n    }\n\n    /**\n     * {@return the file where to dump the command-line when debug is activated or when the compilation failed}\n     *\n     * @see #debugFileName\n     */\n    @Nullable\n    @Override\n    protected String getDebugFileName() {\n        return debugFileName;\n    }\n\n    /**\n     * {@return the module name found in the package hierarchy of given sources}\n     * We have to parse the source instead of the {@code module-info.class} file\n     * because the classes may not have been compiled yet. This is not reliable,\n     * but the use of package hierarchy for modular project should be avoided in\n     * Maven 4.\n     *\n     * @deprecated Declare modules in {@code <source>} elements instead.\n     */\n    @Deprecated(since = \"4.0.0\")\n    final String moduleNameFromPackageHierarchy(List<SourceDirectory> compileSourceRoots) throws IOException {\n        for (SourceDirectory directory : compileSourceRoots) {\n            if (directory.moduleName == null) {\n                String name = parseModuleInfoName(directory.getModuleInfo().orElse(null));\n                if (name != null) {\n                    return name;\n                }\n            }\n        }\n        return null;\n    }\n\n    /**\n     * {@return whether the project has at least one {@code module-info.class} file}\n     * The {@code module-info.class} should be located in the main source code.\n     * However, this method checks also in the test source code for compatibility with Maven 3,\n     * but this practice is deprecated.\n     *\n     * @param roots root directories of the source files of the test classes to compile\n     * @throws IOException if this method needed to read a module descriptor and failed\n     */\n    @Override\n    final boolean hasModuleDeclaration(final List<SourceDirectory> roots) throws IOException {\n        for (SourceDirectory root : roots) {\n            hasMainModuleInfo |= root.moduleName != null;\n            hasTestModuleInfo |= root.getModuleInfo().isPresent();\n            if (hasMainModuleInfo & hasTestModuleInfo) {\n                break;\n            }\n        }\n        if (hasTestModuleInfo) {\n            MessageBuilder message = messageBuilderFactory.builder();\n            message.a(\"Overwriting the \")\n                    .warning(MODULE_INFO + JAVA_FILE_SUFFIX)\n                    .a(\" file in the test directory is deprecated. Use \")\n                    .info(ModuleInfoPatch.FILENAME)\n                    .a(\" instead.\");\n            logger.warn(message.toString());\n            if (SUPPORT_LEGACY) {\n                return useModulePath;\n            }\n        }\n        return useModulePath && hasMainModuleInfo;\n    }\n\n    /**\n     * Creates a new task for compiling the test classes.\n     *\n     * @param listener where to send compilation warnings, or {@code null} for the Maven logger\n     * @throws MojoException if this method identifies an invalid parameter in this <abbr>MOJO</abbr>\n     * @return the task to execute for compiling the tests using the configuration in this <abbr>MOJO</abbr>\n     * @throws IOException if an error occurred while creating the output directory or scanning the source directories\n     */\n    @Override\n    public ToolExecutor createExecutor(DiagnosticListener<? super JavaFileObject> listener) throws IOException {\n        Path mainModulePath = mainOutputDirectory.resolve(MODULE_INFO + CLASS_FILE_SUFFIX);\n        if (Files.isRegularFile(mainModulePath)) {\n            hasMainModuleInfo = true;\n        } else {\n            mainModulePath = null;\n        }\n        return new ToolExecutorForTest(this, listener, mainModulePath);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/ToolExecutor.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.plugin.compiler;\n\nimport javax.lang.model.SourceVersion;\nimport javax.tools.DiagnosticListener;\nimport javax.tools.JavaCompiler;\nimport javax.tools.JavaFileManager;\nimport javax.tools.JavaFileObject;\nimport javax.tools.StandardJavaFileManager;\nimport javax.tools.StandardLocation;\n\nimport java.io.IOException;\nimport java.io.UncheckedIOException;\nimport java.io.Writer;\nimport java.nio.charset.Charset;\nimport java.nio.file.DirectoryNotEmptyException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.ArrayDeque;\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Deque;\nimport java.util.EnumMap;\nimport java.util.EnumSet;\nimport java.util.HashMap;\nimport java.util.LinkedHashMap;\nimport java.util.LinkedHashSet;\nimport java.util.List;\nimport java.util.Locale;\nimport java.util.Map;\nimport java.util.Optional;\nimport java.util.Set;\n\nimport org.apache.maven.api.JavaPathType;\nimport org.apache.maven.api.PathType;\nimport org.apache.maven.api.plugin.Log;\nimport org.apache.maven.api.plugin.MojoException;\nimport org.apache.maven.api.services.DependencyResolverResult;\nimport org.apache.maven.api.services.MavenException;\n\n/**\n * A task which configures and executes a Java tool such as the Java compiler.\n * This class takes a snapshot of the information provided in the <abbr>MOJO</abbr>.\n * Then, it collects additional information such as the source files and the dependencies.\n * The set of source files to compile can optionally be filtered for keeping only the files\n * that changed since the last build with the {@linkplain #applyIncrementalBuild incremental build}.\n *\n * <h2>Thread safety</h2>\n * This class is not thread-safe. However, it is independent of the {@link AbstractCompilerMojo} instance\n * given in argument to the constructor and to the {@linkplain #applyIncrementalBuild incremental build}.\n * After all methods with an {@link AbstractCompilerMojo} argument have been invoked, {@code ToolExecutor}\n * can safety be used in a background thread for launching the compilation (but must still be used by only\n * only thread at a time).\n *\n * @author Martin Desruisseaux\n */\npublic class ToolExecutor {\n    /**\n     * The locale for diagnostics, or {@code null} for the platform default.\n     */\n    private static final Locale LOCALE = null;\n\n    /**\n     * The character encoding of source files, or {@code null} for the platform default encoding.\n     *\n     * @see AbstractCompilerMojo#encoding\n     */\n    protected final Charset encoding;\n\n    /**\n     * The root directories of the Java source files to compile, excluding empty directories.\n     * The list needs to be modifiable for allowing the addition of generated source directories.\n     *\n     * @see AbstractCompilerMojo#compileSourceRoots\n     */\n    final List<SourceDirectory> sourceDirectories;\n\n    /**\n     * The directories where to write generated source files.\n     * This set is either empty or a singleton.\n     *\n     * @see AbstractCompilerMojo#proc\n     * @see StandardLocation#SOURCE_OUTPUT\n     */\n    protected final Set<Path> generatedSourceDirectories;\n\n    /**\n     * All source files to compile. May include files for many Java modules and many Java releases.\n     * When the compilation will be executed, those files will be grouped in compilation units where\n     * each unit will be the source files for one particular Java release.\n     *\n     * @see StandardLocation#SOURCE_PATH\n     * @see StandardLocation#MODULE_SOURCE_PATH\n     */\n    private List<SourceFile> sourceFiles;\n\n    /**\n     * Whether the project contains or is assumed to contain a {@code module-info.java} file.\n     * If the user specified explicitly whether the project is a modular or a classpath JAR,\n     * then this flag is set to the user's specification without verification.\n     * Otherwise, this flag is determined by scanning the list of source files.\n     */\n    protected final boolean hasModuleDeclaration;\n\n    /**\n     * How the source code of the project is organized, or {@code null} if not yet determined.\n     * <a href=\"https://docs.oracle.com/en/java/javase/25/docs/specs/man/javac.html#directory-hierarchies\">Directory\n     * hierarchies</a> are <i>package hierarchy</i>, <i>module hierarchy</i> and <i>module source hierarchy</i>, but\n     * for the purpose of the compiler plugin we do not distinguish between the two latter.\n     *\n     * @see #determineDirectoryHierarchy(Collection)\n     */\n    private DirectoryHierarchy directoryHierarchy;\n\n    /**\n     * The result of resolving the dependencies, or {@code null} if not available or not needed.\n     * For example, this field may be null if the constructor found no file to compile,\n     * so there is no need to fetch dependencies.\n     */\n    final DependencyResolverResult dependencyResolution;\n\n    /**\n     * All dependencies grouped by the path types where to place them, together with the modules to patch.\n     * The path type can be the class-path, module-path, annotation processor path, patched path, <i>etc.</i>\n     * Some path types include a module name.\n     *\n     * <h4>Modifications during the build of multi-release project</h4>\n     * When building a multi-release project, values associated to {@code --class-path}, {@code --module-path}\n     * or {@code --patch-module} options are modified every time that {@code ToolExecutor} compiles for a new\n     * Java release. The output directories for the previous Java releases are inserted as the first elements\n     * of their lists, or new entries are created if no list existed previously for an option.\n     *\n     * @see #dependencies(PathType)\n     * @see #prependDependency(PathType, Path)\n     */\n    private final Map<PathType, Collection<Path>> dependencies;\n\n    /**\n     * The destination directory (or class output directory) for class files.\n     * This directory will be given to the {@code -d} Java compiler option\n     * when compiling the classes for the base Java release.\n     *\n     * @see AbstractCompilerMojo#getOutputDirectory()\n     */\n    protected final Path outputDirectory;\n\n    /**\n     * Configuration of the incremental compilation.\n     *\n     * @see AbstractCompilerMojo#incrementalCompilation\n     * @see AbstractCompilerMojo#useIncrementalCompilation\n     */\n    private final EnumSet<IncrementalBuild.Aspect> incrementalBuildConfig;\n\n    /**\n     * The incremental build to save if the build succeed.\n     * In case of failure, the cached information will be unchanged.\n     */\n    private IncrementalBuild incrementalBuild;\n\n    /**\n     * Whether only a subset of the files will be compiled. This flag can be {@code true} only when\n     * incremental build is enabled and detected that some files do not need to be recompiled.\n     */\n    private boolean isPartialBuild;\n\n    /**\n     * Where to send the compilation warning (never {@code null}). If a null value was specified\n     * to the constructor, then this listener sends the warnings to the Maven {@linkplain #logger}.\n     */\n    protected final DiagnosticListener<? super JavaFileObject> listener;\n\n    /**\n     * The Maven logger for reporting information or warnings to the user.\n     * Used for messages emitted directly by the Maven compiler plugin.\n     * Not necessarily used for messages emitted by the Java compiler.\n     *\n     * <h4>Thread safety</h4>\n     * This logger should be thread-safe if this {@code ToolExecutor} is executed in a background thread.\n     *\n     * @see AbstractCompilerMojo#logger\n     */\n    protected final Log logger;\n\n    /**\n     * The sources to write in the {@code target/javac.args} debug files.\n     * This list contains only the sources for which the compiler has been executed, successfully or not.\n     * If a compilation error occurred, the last element in the list contains the sources where the error occurred.\n     */\n    final List<SourcesForRelease> sourcesForDebugFile;\n\n    /**\n     * Creates a new task by taking a snapshot of the current configuration of the given <abbr>MOJO</abbr>.\n     * This constructor creates the {@linkplain #outputDirectory output directory} if it does not already exist.\n     *\n     * @param mojo the <abbr>MOJO</abbr> from which to take a snapshot\n     * @param listener where to send compilation warnings, or {@code null} for the Maven logger\n     * @throws MojoException if this constructor identifies an invalid parameter in the <abbr>MOJO</abbr>\n     * @throws IOException if an error occurred while creating the output directory or scanning the source directories\n     * @throws MavenException if an error occurred while fetching dependencies\n     *\n     * @see AbstractCompilerMojo#createExecutor(DiagnosticListener)\n     */\n    @SuppressWarnings(\"deprecation\")\n    protected ToolExecutor(final AbstractCompilerMojo mojo, DiagnosticListener<? super JavaFileObject> listener)\n            throws IOException {\n\n        logger = mojo.logger;\n        if (listener == null) {\n            Path root = mojo.project.getRootDirectory();\n            listener = new DiagnosticLogger(logger, mojo.messageBuilderFactory, LOCALE, root);\n        }\n        this.listener = listener;\n        encoding = mojo.charset();\n        incrementalBuildConfig = mojo.incrementalCompilationConfiguration();\n        outputDirectory = Files.createDirectories(mojo.getOutputDirectory());\n        sourceDirectories = mojo.getSourceDirectories(outputDirectory);\n        dependencies = new LinkedHashMap<>();\n        sourcesForDebugFile = new ArrayList<>();\n        /*\n         * Get the source files and whether they include or are assumed to include `module-info.java`.\n         * Note that we perform this step after processing compiler arguments, because this block may\n         * skip the build if there is no source code to compile. We want arguments to be verified first\n         * in order to warn about possible configuration problems.\n         */\n        if (incrementalBuildConfig.contains(IncrementalBuild.Aspect.MODULES)) {\n            boolean hasNoFileMatchers = mojo.hasNoFileMatchers();\n            for (SourceDirectory root : sourceDirectories) {\n                if (root.moduleName == null) {\n                    throw new CompilationFailureException(\"The <incrementalCompilation> value can be \\\"modules\\\" \"\n                            + \"only if all source directories are Java modules.\");\n                }\n                hasNoFileMatchers &= root.includes.isEmpty() && root.excludes.isEmpty();\n            }\n            if (!hasNoFileMatchers) {\n                throw new CompilationFailureException(\"Include and exclude filters cannot be specified \"\n                        + \"when <incrementalCompilation> is set to \\\"modules\\\".\");\n            }\n            hasModuleDeclaration = true;\n            sourceFiles = List.of();\n        } else {\n            /*\n             * The order of the two next lines matter for initialization of `SourceDirectory.moduleInfo`.\n             * This initialization is done indirectly when the walk invokes the `SourceFile` constructor,\n             * which in turn invokes `SourceDirectory.visit(Path)`.\n             */\n            sourceFiles = new PathFilter(mojo).walkSourceFiles(sourceDirectories);\n            hasModuleDeclaration = mojo.hasModuleDeclaration(sourceDirectories);\n            if (sourceFiles.isEmpty()) {\n                generatedSourceDirectories = Set.of();\n                dependencyResolution = null;\n                return;\n            }\n        }\n        /*\n         * Get the dependencies. If the module-path contains any automatic (filename-based)\n         * dependency and the MOJO is compiling the main code, then a warning will be logged.\n         */\n        dependencyResolution = mojo.resolveDependencies(hasModuleDeclaration);\n        if (dependencyResolution != null) {\n            dependencies.putAll(dependencyResolution.getDispatchedPaths());\n        }\n        mojo.resolveProcessorPathEntries(dependencies);\n        mojo.amendincrementalCompilation(incrementalBuildConfig, dependencies.keySet());\n        generatedSourceDirectories = mojo.addGeneratedSourceDirectory(dependencies.keySet());\n        copyDependencyValues();\n    }\n\n    /**\n     * Copies all values of the dependency map in unmodifiable lists.\n     * This is used for creating a snapshot of the current state of the dependency map.\n     */\n    private void copyDependencyValues() {\n        dependencies.entrySet().forEach((entry) -> entry.setValue(List.copyOf(entry.getValue())));\n    }\n\n    /**\n     * Returns the output directory of the main classes if they were compiled in a previous Maven phase.\n     * This method shall always return {@code null} when compiling to main code. The return value can be\n     * non-null only when compiling the test classes, in which case the returned path is the directory to\n     * prepend to the class-path or module-path before to compile the classes managed by this executor.\n     *\n     * @return the directory to prepend to the class-path or module-path, or {@code null} if none\n     */\n    Path getOutputDirectoryOfPreviousPhase() {\n        return null;\n    }\n\n    /**\n     * Returns the directory of the classes compiled for the specified module.\n     * If the project is multi-release, this method returns the directory for the base version.\n     *\n     * <p>This is normally a sub-directory of the same name as the module name.\n     * However, when building tests for a project which is both multi-release and multi-module,\n     * the directory may exist only for a target Java version higher than the base version.</p>\n     *\n     * @param outputDirectory the output directory which is the root of modules\n     * @param moduleName the name of the module for which the class directory is desired\n     * @return directories of classes for the given module\n     */\n    Path resolveModuleOutputDirectory(Path outputDirectory, String moduleName) {\n        return outputDirectory.resolve(moduleName);\n    }\n\n    /**\n     * Name of the module when using package hierarchy, or {@code null} if not applicable.\n     * This is used for setting {@code --patch-module} option during compilation of tests.\n     * This field is null in a class-path project or in a multi-module project.\n     *\n     * <p>This information is used for compatibility with the Maven 3 way to build a modular project.\n     * It is recommended to use the {@code <sources>} element instead. We may remove this method in a\n     * future version if we abandon compatibility with the Maven 3 way to build modular projects.</p>\n     *\n     * @deprecated Declare modules in {@code <source>} elements instead.\n     */\n    @Deprecated(since = \"4.0.0\")\n    String moduleNameFromPackageHierarchy() {\n        return null;\n    }\n\n    /**\n     * {@return whether a release version is specified for all sources}\n     */\n    final boolean isReleaseSpecifiedForAll() {\n        for (SourceDirectory source : sourceDirectories) {\n            if (source.release == null) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * Filters the source files to recompile, or cleans the output directory if everything should be rebuilt.\n     * If the directory structure of the source files has changed since the last build,\n     * or if a compiler option changed, or if a dependency changed,\n     * then this method keeps all source files and cleans the {@linkplain #outputDirectory output directory}.\n     * Otherwise, the source files that did not changed since the last build are removed from the list of sources\n     * to compile. If all source files have been removed, then this method returns {@code false} for notifying the\n     * caller that it can skip the build.\n     *\n     * <p>If this method is invoked many times, all invocations after this first one have no effect.</p>\n     *\n     * @param mojo the <abbr>MOJO</abbr> from which to take the incremental build configuration\n     * @param configuration the options which should match the options used during the last build\n     * @throws IOException if an error occurred while accessing the cache file or walking through the directory tree\n     * @return whether there is at least one file to recompile\n     */\n    public boolean applyIncrementalBuild(final AbstractCompilerMojo mojo, final Options configuration)\n            throws IOException {\n        final boolean checkSources = incrementalBuildConfig.contains(IncrementalBuild.Aspect.SOURCES);\n        final boolean checkClasses = incrementalBuildConfig.contains(IncrementalBuild.Aspect.CLASSES);\n        final boolean checkDepends = incrementalBuildConfig.contains(IncrementalBuild.Aspect.DEPENDENCIES);\n        final boolean checkOptions = incrementalBuildConfig.contains(IncrementalBuild.Aspect.OPTIONS);\n        if (checkSources | checkClasses | checkDepends | checkOptions) {\n            incrementalBuild =\n                    new IncrementalBuild(mojo, sourceFiles, checkSources, configuration, incrementalBuildConfig);\n            String causeOfRebuild = null;\n            if (checkSources) {\n                // Should be first, because this method deletes output files of removed sources.\n                causeOfRebuild = incrementalBuild.inputFileTreeChanges();\n            }\n            if (checkClasses && causeOfRebuild == null) {\n                causeOfRebuild = incrementalBuild.markNewOrModifiedSources();\n            }\n            if (checkDepends && causeOfRebuild == null) {\n                List<String> fileExtensions = mojo.fileExtensions;\n                causeOfRebuild = incrementalBuild.dependencyChanges(dependencies.values(), fileExtensions);\n            }\n            if (checkOptions && causeOfRebuild == null) {\n                causeOfRebuild = incrementalBuild.optionChanges();\n            }\n            if (causeOfRebuild != null) {\n                if (!sourceFiles.isEmpty()) { // Avoid misleading message such as \"all sources changed\".\n                    logger.info(causeOfRebuild);\n                }\n            } else {\n                isPartialBuild = true;\n                sourceFiles = incrementalBuild.getModifiedSources();\n                if (IncrementalBuild.isEmptyOrIgnorable(sourceFiles)) {\n                    incrementalBuildConfig.clear(); // Prevent this method to be executed twice.\n                    logger.info(\"Nothing to compile - all classes are up to date.\");\n                    sourceFiles = List.of();\n                    return false;\n                } else {\n                    int n = sourceFiles.size();\n                    var sb = new StringBuilder(\"Compiling \").append(n).append(\" modified source file\");\n                    if (n > 1) {\n                        sb.append('s'); // Make plural.\n                    }\n                    logger.info(sb.append('.'));\n                }\n            }\n            if (!(checkSources | checkDepends | checkOptions)) {\n                incrementalBuild.deleteCache();\n                incrementalBuild = null;\n            }\n        }\n        incrementalBuildConfig.clear(); // Prevent this method to be executed twice.\n        return true;\n    }\n\n    /**\n     * Writes the incremental build cache into the {@code target/maven-status/maven-compiler-plugin/} directory.\n     * This method should be invoked only once. Next invocations after the first one have no effect.\n     *\n     * @throws IOException if an error occurred while writing the cache\n     */\n    private void saveIncrementalBuild() throws IOException {\n        if (incrementalBuild != null) {\n            incrementalBuild.writeCache();\n            incrementalBuild = null;\n        }\n    }\n\n    /**\n     * {@return a modifiable collection of paths to all dependencies of the given type}\n     * The returned collection is intentionally live: elements can be added or removed\n     * from the collection for changing the state of this executor.\n     *\n     * @param  pathType  type of path for which to get the dependencies\n     */\n    protected Deque<Path> dependencies(PathType pathType) {\n        return (Deque<Path>) dependencies.compute(pathType, (key, paths) -> {\n            if (paths == null) {\n                return new ArrayDeque<>();\n            } else if (paths instanceof ArrayDeque<Path> deque) {\n                return deque;\n            } else {\n                var copy = new ArrayDeque<Path>(paths.size() + 4); // Anticipate the addition of new elements.\n                copy.addAll(paths);\n                return copy;\n            }\n        });\n    }\n\n    /**\n     * Dispatches sources and dependencies on the kind of paths determined by {@code DependencyResolver}.\n     * The targets may be class-path, module-path, annotation processor class-path/module-path, <i>etc</i>.\n     *\n     * @param fileManager the file manager where to set the dependency paths\n     */\n    private void setDependencyPaths(final StandardJavaFileManager fileManager) throws IOException {\n        final var unresolvedPaths = new ArrayList<Path>();\n        for (Map.Entry<PathType, Collection<Path>> entry : dependencies.entrySet()) {\n            Collection<Path> paths = entry.getValue();\n            PathType key = entry.getKey();\n            if (key instanceof JavaPathType type) {\n                /*\n                 * Dependency to a JAR file (usually).\n                 * Placed on: --class-path, --module-path.\n                 */\n                Optional<JavaFileManager.Location> location = type.location();\n                if (location.isPresent()) { // Cannot use `Optional.ifPresent(…)` because of checked IOException.\n                    var value = location.get();\n                    if (value == StandardLocation.CLASS_PATH) {\n                        if (isPartialBuild && !hasModuleDeclaration) {\n                            /*\n                             * From https://docs.oracle.com/en/java/javase/24/docs/specs/man/javac.html:\n                             * \"When compiling code for one or more modules, the class output directory will\n                             * automatically be checked when searching for previously compiled classes.\n                             * When not compiling for modules, for backwards compatibility, the directory is not\n                             * automatically checked for previously compiled classes, and so it is recommended to\n                             * specify the class output directory as one of the locations on the user class path,\n                             * using the --class-path option or one of its alternate forms.\"\n                             */\n                            paths = new ArrayDeque<>(paths);\n                            paths.add(outputDirectory);\n                            entry.setValue(paths);\n                        }\n                    }\n                    fileManager.setLocationFromPaths(value, paths);\n                    continue;\n                }\n            } else if (key instanceof JavaPathType.Modular type) {\n                /*\n                 * Main code to be tested by the test classes. This is handled as a \"dependency\".\n                 * Placed on: --patch-module-path.\n                 */\n                Optional<JavaFileManager.Location> location = type.rawType().location();\n                if (location.isPresent()) {\n                    fileManager.setLocationForModule(location.get(), type.moduleName(), paths);\n                    continue;\n                }\n            }\n            unresolvedPaths.addAll(paths);\n        }\n        if (!unresolvedPaths.isEmpty()) {\n            var sb = new StringBuilder(\"Cannot determine where to place the following artifacts:\");\n            for (Path p : unresolvedPaths) {\n                sb.append(System.lineSeparator()).append(\" - \").append(p);\n            }\n            logger.warn(sb);\n        }\n    }\n\n    /**\n     * Inserts the given path as the first element of the list of paths of the given type.\n     * The main purpose of this method is during the build of a multi-release project,\n     * for adding the output directory of the code targeting the previous Java release\n     * before to compile the code targeting the next Java release. In this context,\n     * the {@code type} argument usually identifies a {@code --class-path},\n     * {@code --module-path} or {@code --patch-module} option.\n     *\n     * @param  pathType type of path for which to add an element\n     * @param  first the path to put first\n     * @return the new paths for the given type, as a modifiable list\n     */\n    protected Deque<Path> prependDependency(final PathType pathType, final Path first) {\n        Deque<Path> paths = dependencies(pathType);\n        paths.addFirst(first);\n        return paths;\n    }\n\n    /**\n     * Ensures that the given value is non-null, replacing null values by the latest version.\n     */\n    private static SourceVersion nonNullOrLatest(SourceVersion release) {\n        return (release != null) ? release : SourceVersion.latest();\n    }\n\n    /**\n     * Groups all sources files first by Java release versions, then by module names.\n     * The elements are sorted in the order of {@link SourceVersion} enumeration values,\n     * with null version sorted last on the assumption that they will be for the latest\n     * version supported by the runtime environment.\n     *\n     * @return the given sources grouped by Java release versions and module names\n     */\n    private Collection<SourcesForRelease> groupByReleaseAndModule() {\n        var result = new EnumMap<SourceVersion, SourcesForRelease>(SourceVersion.class);\n        for (SourceDirectory directory : sourceDirectories) {\n            /*\n             * We need an entry for every versions even if there is no source to compile for a version.\n             * This is needed for configuring the classpath in a consistent way, for example with the\n             * output directory of previous version even if we skipped the compilation of that version.\n             */\n            SourcesForRelease unit = result.computeIfAbsent(\n                    nonNullOrLatest(directory.release),\n                    (release) -> new SourcesForRelease(directory.release)); // Intentionally ignore the key.\n            String moduleName = directory.moduleName;\n            if (moduleName == null || moduleName.isBlank()) {\n                moduleName = \"\";\n            }\n            unit.roots.computeIfAbsent(moduleName, (key) -> new LinkedHashSet<Path>());\n        }\n        for (SourceFile source : sourceFiles) {\n            result.get(nonNullOrLatest(source.directory.release)).add(source);\n        }\n        return result.values();\n    }\n\n    /**\n     * Checks if there are no sources to compile and handles that case.\n     * When there are no sources, this method cleans up the output directory and logs a message.\n     *\n     * @return {@code true} if there are no sources to compile, {@code false} if there are sources\n     * @throws IOException if an error occurred while deleting the empty output directory\n     */\n    private boolean noSourcesToCompile() throws IOException {\n        sourcesForDebugFile.clear();\n        if (sourceFiles.isEmpty()) {\n            String message = \"No sources to compile.\";\n            try {\n                // The directory must exist since it was created in the constructor.\n                Files.delete(outputDirectory);\n            } catch (DirectoryNotEmptyException e) {\n                message += \" However, the output directory is not empty.\";\n            }\n            logger.info(message);\n            return true;\n        }\n        if (logger.isDebugEnabled()) {\n            int n = sourceFiles.size();\n            @SuppressWarnings(\"checkstyle:MagicNumber\")\n            var sb = new StringBuilder(n * 40).append(\"The source files to compile are:\");\n            for (SourceFile file : sourceFiles) {\n                sb.append(System.lineSeparator()).append(\"    \").append(file);\n            }\n            logger.debug(sb);\n        }\n        return false;\n    }\n\n    /**\n     * Determines the directory hierarchy by scanning all compilation units.\n     * Also validates that there are no conflicting directory hierarchies\n     * and performs the necessary remapping for Maven 3 compatibility.\n     * This should be called once before processing any units.\n     *\n     * @param units all compilation units to scan\n     * @throws CompilationFailureException if both explicit and detected module names are present\n     */\n    private void determineDirectoryHierarchy(final Collection<SourcesForRelease> units) {\n        final String moduleNameFromPackageHierarchy = moduleNameFromPackageHierarchy();\n        for (SourcesForRelease unit : units) {\n            for (String moduleName : unit.roots.keySet()) {\n                DirectoryHierarchy detected;\n                if (moduleName.isEmpty()) {\n                    if (moduleNameFromPackageHierarchy == null) {\n                        detected = DirectoryHierarchy.PACKAGE;\n                    } else {\n                        detected = DirectoryHierarchy.PACKAGE_WITH_MODULE;\n                    }\n                } else {\n                    if (moduleNameFromPackageHierarchy == null) {\n                        detected = DirectoryHierarchy.MODULE_SOURCE;\n                    } else {\n                        // Mix of package hierarchy and module source hierarchy.\n                        throw new CompilationFailureException(\n                                \"The \\\"%s\\\" module must be declared in a <module> element of <sources>.\"\n                                        .formatted(moduleNameFromPackageHierarchy));\n                    }\n                }\n                if (directoryHierarchy == null) {\n                    directoryHierarchy = detected;\n                } else if (directoryHierarchy != detected) {\n                    throw new CompilationFailureException(\n                            \"Mix of %s and %s hierarchies.\".formatted(directoryHierarchy, detected));\n                }\n            }\n        }\n        /*\n         * The following adjustment is for the case when the project is a Java module, but nevertheless organized\n         * in a package hierarchy instead of a module source hierarchy. Update the `unit.roots` map for compiling\n         * the module as if module source hiearchy was used. It will require moving the output directory after\n         * compilation, which is done by `ModuleDirectoryRemover`.\n         */\n        if (moduleNameFromPackageHierarchy != null) {\n            for (SourcesForRelease unit : units) {\n                Set<Path> paths = unit.roots.remove(\"\");\n                if (paths != null) {\n                    unit.roots.put(moduleNameFromPackageHierarchy, paths);\n                }\n            }\n        }\n    }\n\n    /**\n     * Manager of class-path or module-paths specified to a {@link StandardJavaFileManager}.\n     * This base class assumes {@link DirectoryHierarchy#PACKAGE}, and a subclass is defined\n     * for the {@link DirectoryHierarchy#MODULE_SOURCE} case.\n     */\n    private class PathManager {\n        /**\n         * The file manager to configure for class-path or module-paths.\n         */\n        protected final StandardJavaFileManager fileManager;\n\n        /**\n         * The output directory of the previous compilation phase or version.\n         * For test compilation, this is the main output directory.\n         * For multi-release, this is the output of the previous Java version.\n         */\n        protected Path latestOutputDirectory;\n\n        /**\n         * Whether we are compiling a version after the base version.\n         *\n         * @see #markVersioned()\n         */\n        private boolean isVersioned;\n\n        /**\n         * Creates a new path manager for the given file manager.\n         *\n         * @param fileManager the file manager to configure for class-path or module-paths\n         */\n        protected PathManager(StandardJavaFileManager fileManager) {\n            this.fileManager = fileManager;\n            latestOutputDirectory = getOutputDirectoryOfPreviousPhase();\n        }\n\n        /**\n         * Merges all the given sets into a single set. We use our own loop instead of streams\n         * because the given collection should always contain exactly one {@code Set<Path>},\n         * so we can return that set directly without copying its content in a new set.\n         * The merge is a paranoiac safety as we could also throw an exception instead.\n         */\n        private static Set<Path> merge(final Collection<Set<Path>> directories) {\n            Set<Path> allSources = Set.of();\n            for (Set<Path> more : directories) {\n                if (allSources.isEmpty()) {\n                    allSources = more;\n                } else {\n                    // Should never happen, but merge anyway by safety.\n                    allSources = new LinkedHashSet<>(allSources);\n                    allSources.addAll(more);\n                }\n            }\n            return allSources;\n        }\n\n        /**\n         * Configures source directories for all roots in a compilation unit.\n         * Also configures the class-path or module-paths with the output directories\n         * of previous compilation units (if any).\n         *\n         * <h4>Default implementation</h4>\n         * The default implementation configures source directories and class-path for package hierarchy\n         * without {@code module-info}. Sub-classes need to override this method if the project is modular.\n         *\n         * @param roots map of module names to source paths\n         * @throws IOException if an error occurred while setting locations\n         */\n        protected void configureSourcePaths(final Map<String, Set<Path>> roots) throws IOException {\n            fileManager.setLocationFromPaths(StandardLocation.SOURCE_PATH, merge(roots.values()));\n\n            // For multi-release builds, add previous version's output to class-path.\n            if (latestOutputDirectory != null) {\n                Deque<Path> paths = prependDependency(JavaPathType.CLASSES, latestOutputDirectory);\n                fileManager.setLocationFromPaths(StandardLocation.CLASS_PATH, paths);\n            }\n        }\n\n        /**\n         * Sets up the output directory for a compilation unit.\n         *\n         * @param unit the compilation unit\n         * @throws IOException if an error occurred while creating directories or setting locations\n         */\n        final void setupOutputDirectory(final SourcesForRelease unit) throws IOException {\n            Path outputForRelease = outputDirectory;\n            if (isVersioned) {\n                outputForRelease = Files.createDirectories(\n                        directoryHierarchy.outputDirectoryForReleases(outputForRelease, unit.release));\n            }\n            fileManager.setLocationFromPaths(StandardLocation.CLASS_OUTPUT, Set.of(outputForRelease));\n            // Records that a compilation unit completed, updating the baseline for the next phase.\n            latestOutputDirectory = outputForRelease;\n            unit.outputForRelease = outputForRelease;\n            sourcesForDebugFile.add(unit);\n        }\n\n        /**\n         * Marks that subsequent iterations are for versions after the base version.\n         */\n        final void markVersioned() {\n            isVersioned = true;\n        }\n    }\n\n    /**\n     * Manager of module-paths specified to a {@link StandardJavaFileManager}.\n     * This subclass handles the {@link DirectoryHierarchy#MODULE_SOURCE} case.\n     *\n     * <h2>Implementation details</h2>\n     * The fields in this class are used for patching, i.e. when compiling test classes or a non-base version\n     * of a multi-release project. The output directory of the previous Java version needs to be added to the\n     * class-path or module-path. However, in the case of a modular project, we can add to the module path only\n     * once and all other additions must be done as patches.\n     */\n    private final class ModulePathManager extends PathManager {\n        /**\n         * Whether we can add output directories to the module-path.\n         * For modular projects, we can only add to module-path once.\n         * Subsequent additions must use {@code --patch-module}.\n         */\n        private boolean canAddOutputToModulePath;\n\n        /**\n         * Tracks modules from previous versions that may not be present in the current version.\n         * Keys are module names, values indicate whether cleanup is needed.\n         */\n        private final Map<String, Boolean> modulesNotPresentInNewVersion;\n\n        /**\n         * Tracks how many source directories were added as patches per module.\n         * Keys are module names, values are the count of source directories.\n         * Used to remove these source entries and replace them with compiled output.\n         *\n         * <h4>Purpose</h4>\n         * When patching a module, the source directories of the compilation unit are declared as a patch applied\n         * over the output directories of previous compilation units. But after the compilation, if there are more\n         * units to compile, we will need to replace the sources in {@code --patch-module} by the compilation output\n         * before to declare the source directories of the next compilation unit.\n         */\n        private final Map<String, Integer> modulesWithSourcesAsPatches;\n\n        /**\n         * Creates a new path manager for the given file manager.\n         *\n         * @param fileManager  the  file manager to configure for class-path or module-paths\n         */\n        ModulePathManager(StandardJavaFileManager fileManager) {\n            super(fileManager);\n            canAddOutputToModulePath = true;\n            modulesNotPresentInNewVersion = new LinkedHashMap<>();\n            modulesWithSourcesAsPatches = new HashMap<>();\n        }\n\n        /**\n         * Configures module source paths for all roots in a compilation unit.\n         * If the project uses package hierarchy with a {@code module-info} file,\n         * the module names in the keys of the {@code roots} map must have been resolved by\n         * {@link #determineDirectoryHierarchy(Collection)} before to invoke this method.</p>\n         *\n         * <p>Configures also the {@code --patch-module} options for a module being compiled for\n         * a newer Java version. The patch consists of (in order, highest priority first):</p>\n         * <ol>\n         *   <li>Current source paths (so the compiler sees the new version's sources).</li>\n         *   <li>Output from previous Java version (compiled classes to inherit).</li>\n         *   <li>Existing patch-module dependencies.</li>\n         * </ol>\n         *\n         * @param roots map of module names to source paths\n         * @throws IOException if an error occurred while setting locations\n         */\n        @Override\n        protected void configureSourcePaths(final Map<String, Set<Path>> roots) throws IOException {\n            for (var entry : roots.entrySet()) {\n                final String moduleName = entry.getKey();\n                final Set<Path> sourcePaths = entry.getValue();\n                fileManager.setLocationForModule(StandardLocation.MODULE_SOURCE_PATH, moduleName, sourcePaths);\n                modulesNotPresentInNewVersion.put(moduleName, Boolean.FALSE);\n                /*\n                 * When compiling for the base Java version, the configuration for current module is finished.\n                 * The remaining of this loop is executed only for target Java versions after the base version.\n                 * In those cases, we need to add the paths to the classes compiled for the previous version.\n                 * A non-modular project would always add the paths to the class-path. For a modular project,\n                 * add the paths to the module-path only the first time. After, we need to use patch-module.\n                 */\n                if (latestOutputDirectory != null) {\n                    if (canAddOutputToModulePath) {\n                        canAddOutputToModulePath = false;\n                        Deque<Path> paths = prependDependency(JavaPathType.MODULES, latestOutputDirectory);\n                        fileManager.setLocationFromPaths(StandardLocation.MODULE_PATH, paths);\n                    }\n                    /*\n                     * For a modular project, following block can be executed an arbitrary number of times\n                     * We need to declare that the sources that we are compiling are for patching a module.\n                     * But we also need to remember that these sources will need to be removed in the next\n                     * iteration, because they will be replaced by the compiled classes (the above block).\n                     */\n                    final Deque<Path> paths = dependencies(JavaPathType.patchModule(moduleName));\n                    removeFirsts(paths, modulesWithSourcesAsPatches.put(moduleName, sourcePaths.size()));\n                    Path latestOutput = resolveModuleOutputDirectory(latestOutputDirectory, moduleName);\n                    if (Files.exists(latestOutput)) {\n                        paths.addFirst(latestOutput);\n                    }\n                    sourcePaths.forEach(paths::addFirst);\n                    fileManager.setLocationForModule(StandardLocation.PATCH_MODULE_PATH, moduleName, paths);\n                }\n            }\n            omitSourcelessModulesInNewVersion();\n        }\n\n        /**\n         * Removes from compilation the modules that were present in previous version but not in the current version.\n         * This clears the source paths and updates patch-module for leftover modules.\n         * This method has no effect when compiling for the base Java version.\n         *\n         * @throws IOException if an error occurred while setting locations\n         */\n        private void omitSourcelessModulesInNewVersion() throws IOException {\n            for (var iterator = modulesNotPresentInNewVersion.entrySet().iterator(); iterator.hasNext(); ) {\n                Map.Entry<String, Boolean> entry = iterator.next();\n                if (entry.getValue()) {\n                    String moduleName = entry.getKey();\n                    Deque<Path> paths = dependencies(JavaPathType.patchModule(moduleName));\n                    if (removeFirsts(paths, modulesWithSourcesAsPatches.remove(moduleName))) {\n                        paths.addFirst(latestOutputDirectory.resolve(moduleName));\n                    } else if (paths.isEmpty()) {\n                        // Not sure why the following is needed, but it has been observed in real projects.\n                        paths.add(outputDirectory.resolve(moduleName));\n                    }\n                    fileManager.setLocationForModule(StandardLocation.PATCH_MODULE_PATH, moduleName, paths);\n                    fileManager.setLocationForModule(StandardLocation.MODULE_SOURCE_PATH, moduleName, Set.of());\n                    iterator.remove();\n                } else {\n                    entry.setValue(Boolean.TRUE); // For compilation of next target version (if any).\n                }\n            }\n        }\n\n        /**\n         * Removes the first <var>n</var> elements of the given collection.\n         * This is used for removing {@code --patch-module} items that were added as source directories.\n         * The callers should replace the removed items by the output directory of these source files.\n         *\n         * @param paths  the paths from which to remove the first elements\n         * @param count  number of elements to remove, or {@code null} if none\n         * @return whether at least one item has been removed\n         */\n        private static boolean removeFirsts(Deque<Path> paths, Integer count) {\n            boolean changed = false;\n            if (count != null) {\n                for (int i = count; --i >= 0; ) {\n                    changed |= (paths.removeFirst() != null);\n                }\n            }\n            return changed;\n        }\n    }\n\n    /**\n     * Runs the compilation task.\n     *\n     * @param compiler the compiler\n     * @param configuration the options to give to the Java compiler\n     * @param otherOutput where to write additional output from the compiler\n     * @return whether the compilation succeeded\n     * @throws IOException if an error occurred while reading or writing a file\n     * @throws MojoException if the compilation failed for a reason identified by this method\n     * @throws RuntimeException if any other kind of  error occurred\n     */\n    public boolean compile(JavaCompiler compiler, final Options configuration, final Writer otherOutput)\n            throws IOException {\n\n        if (noSourcesToCompile()) {\n            return true;\n        }\n\n        // Determine project type once from all units before processing.\n        final Collection<SourcesForRelease> units = groupByReleaseAndModule();\n        determineDirectoryHierarchy(units);\n\n        // Workaround for a `javax.tools` method which seems not yet supported on all compilers.\n        if (WorkaroundForPatchModule.ENABLED && hasModuleDeclaration && !(compiler instanceof ForkedTool)) {\n            compiler = new WorkaroundForPatchModule(compiler);\n        }\n        boolean success = true;\n        try (StandardJavaFileManager fileManager = compiler.getStandardFileManager(listener, LOCALE, encoding)) {\n            setDependencyPaths(fileManager);\n            if (!generatedSourceDirectories.isEmpty()) {\n                fileManager.setLocationFromPaths(StandardLocation.SOURCE_OUTPUT, generatedSourceDirectories);\n            }\n            final PathManager pathManager =\n                    switch (directoryHierarchy) {\n                        case PACKAGE -> new PathManager(fileManager);\n                        case PACKAGE_WITH_MODULE, MODULE_SOURCE -> new ModulePathManager(fileManager);\n                    };\n\n            // Compile each release version in order (base version first for multi-release projects).\n            for (final SourcesForRelease unit : units) {\n                configuration.setRelease(unit.getReleaseString());\n                pathManager.configureSourcePaths(unit.roots);\n\n                // Snapshot dependencies for debug file\n                copyDependencyValues();\n                unit.dependencySnapshot = new LinkedHashMap<>(dependencies);\n\n                // Set up output directory and compile (only if there are files).\n                pathManager.setupOutputDirectory(unit);\n\n                // Compile the source files now.\n                if (!unit.files.isEmpty()) {\n                    Iterable<? extends JavaFileObject> sources = fileManager.getJavaFileObjectsFromPaths(unit.files);\n                    JavaCompiler.CompilationTask task;\n                    task = compiler.getTask(otherOutput, fileManager, listener, configuration.options, null, sources);\n                    success = task.call();\n                    if (!success) {\n                        break;\n                    }\n                }\n                pathManager.markVersioned();\n            }\n        } catch (UncheckedIOException e) {\n            throw e.getCause();\n        }\n\n        // Performs post-compilation tasks such as logging and writing incremental build cache.\n        if (listener instanceof DiagnosticLogger diagnostic) {\n            diagnostic.logSummary();\n        }\n        if (success) {\n            saveIncrementalBuild();\n        }\n        return success;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/ToolExecutorForTest.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.plugin.compiler;\n\nimport javax.lang.model.SourceVersion;\nimport javax.tools.DiagnosticListener;\nimport javax.tools.JavaCompiler;\nimport javax.tools.JavaFileObject;\n\nimport java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.UncheckedIOException;\nimport java.io.Writer;\nimport java.lang.module.ModuleDescriptor;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.HashMap;\nimport java.util.LinkedHashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.NavigableMap;\nimport java.util.TreeMap;\nimport java.util.stream.Stream;\n\nimport static org.apache.maven.plugin.compiler.AbstractCompilerMojo.SUPPORT_LEGACY;\nimport static org.apache.maven.plugin.compiler.DirectoryHierarchy.META_INF;\nimport static org.apache.maven.plugin.compiler.SourceDirectory.CLASS_FILE_SUFFIX;\nimport static org.apache.maven.plugin.compiler.SourceDirectory.MODULE_INFO;\n\n/**\n * A task which configures and executes the Java compiler for the test classes.\n * This executor contains additional configurations compared to the base class.\n *\n * @author Martin Desruisseaux\n */\nclass ToolExecutorForTest extends ToolExecutor {\n    /**\n     * The output directory of the main classes.\n     * This directory will be added to the class-path or module-path.\n     *\n     * @see TestCompilerMojo#mainOutputDirectory\n     */\n    private final Path mainOutputDirectory;\n\n    /**\n     * The main output directory of each module. This is usually {@code mainOutputDirectory/<module>},\n     * except if some modules are defined only for some Java versions higher than the base version.\n     */\n    private final Map<String, Path> mainOutputDirectoryForModules;\n\n    /**\n     * Whether to place the main classes on the module path when {@code module-info} is present.\n     * The default and recommended value is {@code true}. The user may force to {@code false},\n     * in which case the main classes are placed on the class path, but this is deprecated.\n     * This flag may be removed in a future version if we remove support of this practice.\n     *\n     * @deprecated Use {@code \"claspath-jar\"} dependency type instead, and avoid {@code module-info.java} in tests.\n     *\n     * @see TestCompilerMojo#useModulePath\n     */\n    @Deprecated(since = \"4.0.0\")\n    private final boolean useModulePath;\n\n    /**\n     * Whether a {@code module-info.java} file is defined in the test sources.\n     * In such case, it has precedence over the {@code module-info.java} in main sources.\n     * This is defined for compatibility with Maven 3, but not recommended.\n     *\n     * @deprecated Avoid {@code module-info.java} in tests.\n     */\n    @Deprecated(since = \"4.0.0\")\n    private final boolean hasTestModuleInfo;\n\n    /**\n     * Name of the module when using package hierarchy, or {@code null} if not applicable.\n     * This is used for setting {@code --patch-module} option during compilation of tests.\n     * This field is null in a class-path project or in a multi-module project.\n     *\n     * <p>This field exists mostly for compatibility with the Maven 3 way to build a modular project.\n     * It is recommended to use the {@code <sources>} element instead. We may remove this field in a\n     * future version if we abandon compatibility with the Maven 3 way to build modular projects.</p>\n     *\n     * @deprecated Declare modules in {@code <source>} elements instead.\n     */\n    @Deprecated(since = \"4.0.0\")\n    private String moduleNameFromPackageHierarchy;\n\n    /**\n     * Whether {@link #addModuleOptions(Options)} has already been invoked.\n     * The options shall be completed only once, otherwise conflicts may occur.\n     */\n    private boolean addedModuleOptions;\n\n    /**\n     * If non-null, the {@code module} part to remove in {@code target/test-classes/module/package}.\n     * This {@code module} directory is generated by {@code javac} for some compiler options.\n     * We keep that directory when the project is configured with the new {@code <source>} element,\n     * but have to remove it for compatibility reason if the project is compiled in the old way.\n     *\n     * @deprecated Exists only for compatibility with the Maven 3 way to do a modular project.\n     * Is likely to cause confusion, for example with incremental builds.\n     * New projects should use the {@code <source>} elements instead.\n     */\n    @Deprecated(since = \"4.0.0\")\n    private String directoryLevelToRemove;\n\n    /**\n     * Creates a new task by taking a snapshot of the current configuration of the given <abbr>MOJO</abbr>.\n     * This constructor creates the {@linkplain #outputDirectory output directory} if it does not already exist.\n     *\n     * @param mojo the <abbr>MOJO</abbr> from which to take a snapshot\n     * @param listener where to send compilation warnings, or {@code null} for the Maven logger\n     * @param mainModulePath path to the {@code module-info.class} file of the main code, or {@code null} if none\n     * @throws MojoException if this constructor identifies an invalid parameter in the <abbr>MOJO</abbr>\n     * @throws IOException if an error occurred while creating the output directory or scanning the source directories\n     */\n    @SuppressWarnings(\"deprecation\")\n    ToolExecutorForTest(\n            final TestCompilerMojo mojo,\n            final DiagnosticListener<? super JavaFileObject> listener,\n            final Path mainModulePath)\n            throws IOException {\n        super(mojo, listener);\n        /*\n         * Notable work done by the parent constructor (examples with default paths):\n         *\n         *  - Set `outputDirectory` to a single \"target/test-classes\".\n         *  - Set `sourceDirectories` to many \"src/<module>/test/java\".\n         *  - Set `sourceFiles` to the content of `sourceDirectories`.\n         *  - Set `dependencies` with class-path and module-path, but not including main output directory.\n         *\n         * We will need to add the main output directory to the class-path or module-path, but not here.\n         * It will be done by `ToolExecutor.compile(…)` if `getOutputDirectoryOfPreviousPhase()` returns\n         * a non-null value.\n         */\n        useModulePath = mojo.useModulePath;\n        hasTestModuleInfo = mojo.hasTestModuleInfo;\n        mainOutputDirectory = mojo.mainOutputDirectory;\n        mainOutputDirectoryForModules = new HashMap<>();\n        if (Files.notExists(mainOutputDirectory)) {\n            return;\n        }\n        if (mainModulePath != null) {\n            try (InputStream in = Files.newInputStream(mainModulePath)) {\n                moduleNameFromPackageHierarchy = ModuleDescriptor.read(in).name();\n            }\n        }\n        // Following is non-null only for modular project using package hierarchy.\n        final String testModuleName = mojo.moduleNameFromPackageHierarchy(sourceDirectories);\n        if (testModuleName != null) {\n            moduleNameFromPackageHierarchy = testModuleName;\n        }\n        /*\n         * If compiling the test classes of a modular project, we will need `--patch-modules` options.\n         * In this case, the option values are directories of main class files of the patched module.\n         * This block only prepares an empty map for each module. Maps are filled in the next block.\n         */\n        final var patchedModules = new LinkedHashMap<String, NavigableMap<SourceVersion, Path>>();\n        for (SourceDirectory dir : sourceDirectories) {\n            String moduleToPatch = dir.moduleName;\n            if (moduleToPatch == null) {\n                moduleToPatch = moduleNameFromPackageHierarchy;\n                if (moduleToPatch == null) {\n                    continue; // No module-info found.\n                }\n                /*\n                 * Modular project using package hierarchy (Maven 3 way).\n                 * We will need to move directories after compilation for reproducing the Maven 3 output.\n                 */\n                directoryLevelToRemove = moduleToPatch;\n            }\n            if (testModuleName != null && !moduleToPatch.equals(testModuleName)) {\n                // Mix of package hierarchy and module source hierarchy.\n                throw new CompilationFailureException(\n                        \"The \\\"\" + testModuleName + \"\\\" module must be declared in a <module> element of <sources>.\");\n            }\n            patchedModules.put(moduleToPatch, new TreeMap<>()); // Signal that this module exists in the test.\n        }\n        // Shortcut for class-path projects.\n        if (patchedModules.isEmpty()) {\n            return;\n        }\n        /*\n         * The values of `patchedModules` are empty maps. Now, add the real paths to the\n         * main classes for each module that exists in both the main code and the tests.\n         * Note that a module may exist only in the `META-INF/versions-modular/` directory.\n         */\n        addDirectoryIfModule(\n                mainOutputDirectory, moduleNameFromPackageHierarchy, SourceVersion.RELEASE_0, patchedModules);\n        addModuleDirectories(mainOutputDirectory, SourceVersion.RELEASE_0, patchedModules);\n        Path versionsDirectory = DirectoryHierarchy.MODULE_SOURCE.outputDirectoryForReleases(mainOutputDirectory);\n        if (Files.exists(versionsDirectory)) {\n            List<Path> asList;\n            try (Stream<Path> paths = Files.list(versionsDirectory)) {\n                asList = paths.toList();\n            }\n            for (Path path : asList) {\n                SourceVersion version;\n                try {\n                    version = SourceDirectory.parse(path.getFileName().toString());\n                } catch (UnsupportedVersionException e) {\n                    logger.debug(e);\n                    continue;\n                }\n                addModuleDirectories(path, version, patchedModules);\n            }\n        }\n        /*\n         * At this point, we finished to scan the main output directory for modules.\n         * Remembers the directories of each module. They are usually sub-directories\n         * of the main directory, but could also be in `META-INF/versions-modular/`.\n         */\n        patchedModules.forEach((moduleToPatch, directories) -> {\n            Map.Entry<SourceVersion, Path> base = directories.firstEntry();\n            if (base != null) {\n                mainOutputDirectoryForModules.putIfAbsent(moduleToPatch, base.getValue());\n            }\n        });\n    }\n\n    /**\n     * Performs a shallow scan of the given directory for modules.\n     * This method searches for {@code module-info.class} files.\n     *\n     * <p>The keys of the {@code addTo} map are module names. Values are paths for all versions where\n     * {@code module-info.class} has been found. Note that this is not an exhaustive list of paths for\n     * all versions, because most {@code versions} directories do not have a {@code module-info.class} file.\n     * Therefore, the {@code SortedMap} will usually contain only the base directory. But we check versions\n     * anyway because sometime, a module does not exist in the base directory and is first defined only for\n     * a higher version.</p>\n     *\n     * <p>This method adds paths to existing entries only, and ignores modules that are not already in the map.\n     * This is done that way for collecting modules that are both in the main code and in the tests.</p>\n     *\n     * @param directory the directory to scan\n     * @param version target Java version of the directory to add\n     * @param addTo where to add the module paths\n     * @throws IOException if an error occurred while scanning the directories\n     */\n    private void addModuleDirectories(\n            Path directory, SourceVersion version, Map<String, NavigableMap<SourceVersion, Path>> addTo)\n            throws IOException {\n\n        try (Stream<Path> paths = Files.list(directory)) {\n            paths.forEach(\n                    (path) -> addDirectoryIfModule(path, path.getFileName().toString(), version, addTo));\n        } catch (UncheckedIOException e) {\n            throw e.getCause();\n        }\n    }\n\n    /**\n     * Adds the given directory in {@code addTo} if the directory contains a {@code module-info.class} file.\n     *\n     * @param directory the directory to scan\n     * @param moduleName name of the module to add\n     * @param version target Java version of the directory to add\n     * @param addTo where to add the module paths\n     */\n    private static void addDirectoryIfModule(\n            Path directory,\n            String moduleName,\n            SourceVersion version,\n            Map<String, NavigableMap<SourceVersion, Path>> addTo) {\n\n        NavigableMap<SourceVersion, Path> versions = addTo.get(moduleName);\n        if (versions != null && Files.isRegularFile(directory.resolve(MODULE_INFO + CLASS_FILE_SUFFIX))) {\n            versions.putIfAbsent(version, directory);\n        }\n    }\n\n    /**\n     * Completes the given configuration with module options the first time that this method is invoked.\n     * If at least one {@value ModuleInfoPatch#FILENAME} file is found in a root directory of test sources,\n     * then these files are parsed and the options that they declare are added to the given configuration.\n     * Otherwise, if {@link #hasModuleDeclaration} is {@code true}, then this method generates the\n     * {@code --add-modules} and {@code --add-reads} options for dependencies that are not in the main compilation.\n     * If this method is invoked more than once, all invocations after the first one have no effect.\n     *\n     * @param configuration where to add the options\n     * @throws IOException if the module information of a dependency or the module-info patch cannot be read\n     */\n    @SuppressWarnings({\"checkstyle:MissingSwitchDefault\", \"fallthrough\"})\n    private void addModuleOptions(final Options configuration) throws IOException {\n        if (addedModuleOptions) {\n            return;\n        }\n        addedModuleOptions = true;\n        ModuleInfoPatch info = null;\n        ModuleInfoPatch defaultInfo = null;\n        final var patches = new LinkedHashMap<String, ModuleInfoPatch>();\n        for (SourceDirectory source : sourceDirectories) {\n            Path file = source.root.resolve(ModuleInfoPatch.FILENAME);\n            String moduleName;\n            if (Files.notExists(file)) {\n                if (SUPPORT_LEGACY && useModulePath && hasTestModuleInfo && hasModuleDeclaration) {\n                    /*\n                     * Do not add any `--add-reads` parameters. The developers should put\n                     * everything needed in the `module-info`, including test dependencies.\n                     */\n                    continue;\n                }\n                /*\n                 * No `patch-module-info` file. Generate a default module patch instance for the\n                 * `--add-modules TEST-MODULE-PATH` and `--add-reads TEST-MODULE-PATH` options.\n                 * We generate that patch only for the first module. If there is more modules\n                 * without `patch-module-info`, we will copy the `defaultInfo` instance.\n                 */\n                moduleName = source.moduleName;\n                if (moduleName == null) {\n                    moduleName = moduleNameFromPackageHierarchy;\n                    if (moduleName == null) {\n                        continue;\n                    }\n                }\n                if (defaultInfo != null) {\n                    patches.putIfAbsent(moduleName, null); // Remember that we will need to compute a value later.\n                    continue;\n                }\n                defaultInfo = new ModuleInfoPatch(moduleName, info);\n                defaultInfo.setToDefaults();\n                info = defaultInfo;\n            } else {\n                info = new ModuleInfoPatch(moduleNameFromPackageHierarchy, info);\n                try (BufferedReader reader = Files.newBufferedReader(file)) {\n                    info.load(reader);\n                }\n                moduleName = info.getModuleName();\n            }\n            if (patches.put(moduleName, info) != null) {\n                throw new ModuleInfoPatchException(\n                        \"\\\"module-info-patch \" + moduleName + \"\\\" is defined more than once.\");\n            }\n        }\n        /*\n         * Replace all occurrences of `TEST-MODULE-PATH` by the actual dependency paths.\n         * Add `--add-modules` and `--add-reads` options with default values equivalent to\n         * `TEST-MODULE-PATH` for every module that do not have a `module-info-patch` file.\n         */\n        for (Map.Entry<String, ModuleInfoPatch> entry : patches.entrySet()) {\n            info = entry.getValue();\n            if (info != null) {\n                info.replaceProjectModules(sourceDirectories);\n                info.replaceTestModulePath(dependencyResolution);\n            } else {\n                // `defaultInfo` cannot be null if this `info` value is null.\n                entry.setValue(defaultInfo.patchWithSameReads(entry.getKey()));\n            }\n        }\n        /*\n         * Write the runtime dependencies in the `META-INF/maven/module-info-patch.args` file.\n         * Note that we unconditionally write in the root output directory, not in the module directory,\n         * because a single option file applies to all modules.\n         */\n        if (!patches.isEmpty()) {\n            Path directory = // TODO: replace by Path.resolve(String, String...) with JDK22.\n                    Files.createDirectories(outputDirectory.resolve(META_INF).resolve(\"maven\"));\n            try (BufferedWriter out = Files.newBufferedWriter(directory.resolve(\"module-info-patch.args\"))) {\n                for (ModuleInfoPatch m : patches.values()) {\n                    m.writeTo(configuration, out);\n                }\n            }\n        }\n    }\n\n    /**\n     * @hidden\n     */\n    @Override\n    public boolean applyIncrementalBuild(AbstractCompilerMojo mojo, Options configuration) throws IOException {\n        addModuleOptions(configuration); // Effective only once.\n        return super.applyIncrementalBuild(mojo, configuration);\n    }\n\n    /**\n     * @hidden\n     */\n    @Override\n    public boolean compile(JavaCompiler compiler, Options configuration, Writer otherOutput) throws IOException {\n        addModuleOptions(configuration); // Effective only once.\n        try (var r = ModuleDirectoryRemover.create(outputDirectory, directoryLevelToRemove)) {\n            return super.compile(compiler, configuration, otherOutput);\n        }\n    }\n\n    /**\n     * Returns the output directory of the main classes. This is the directory to prepend to\n     * the class-path or module-path before to compile the classes managed by this executor.\n     *\n     * @return the directory to prepend to the class-path or module-path\n     */\n    @Override\n    Path getOutputDirectoryOfPreviousPhase() {\n        return mainOutputDirectory;\n    }\n\n    /**\n     * Returns the directory of the classes compiled for the specified module.\n     * If the project is multi-release, this method returns the directory for the base version.\n     *\n     * @param outputDirectory the output directory which is the root of modules\n     * @param moduleName the name of the module for which the class directory is desired\n     * @return directories of classes for the given module\n     */\n    @Override\n    Path resolveModuleOutputDirectory(Path outputDirectory, String moduleName) {\n        if (outputDirectory.equals(mainOutputDirectory)) {\n            Path path = mainOutputDirectoryForModules.get(moduleName);\n            if (path != null) {\n                return path;\n            }\n        }\n        return super.resolveModuleOutputDirectory(outputDirectory, moduleName);\n    }\n\n    /**\n     * Name of the module when using package hierarchy, or {@code null} if not applicable.\n     * This is null in a class-path project or in a multi-module project.\n     *\n     * @deprecated This information exists only for compatibility with the Maven 3 way to build a modular project.\n     */\n    @Override\n    @Deprecated(since = \"4.0.0\")\n    final String moduleNameFromPackageHierarchy() {\n        return moduleNameFromPackageHierarchy;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/UnsupportedVersionException.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.plugin.compiler;\n\n/**\n * Thrown when the source cannot be compiled because it required a Java version\n * higher than the current runtime.\n *\n * @author Martin Desruisseaux\n */\n@SuppressWarnings(\"serial\")\npublic class UnsupportedVersionException extends CompilationFailureException {\n    /**\n     * Creates a new exception with the given message.\n     *\n     * @param message the short message\n     */\n    public UnsupportedVersionException(String message) {\n        super(message);\n    }\n\n    /**\n     * Creates a new exception with the given message and cause.\n     *\n     * @param message the short message\n     * @param cause the cause of the failure, or {@code null} if none\n     */\n    public UnsupportedVersionException(String message, Throwable cause) {\n        super(message, cause);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/WorkaroundForPatchModule.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.plugin.compiler;\n\nimport javax.annotation.processing.Processor;\nimport javax.lang.model.SourceVersion;\nimport javax.tools.DiagnosticListener;\nimport javax.tools.FileObject;\nimport javax.tools.ForwardingJavaFileManager;\nimport javax.tools.JavaCompiler;\nimport javax.tools.JavaFileManager;\nimport javax.tools.JavaFileObject;\nimport javax.tools.StandardJavaFileManager;\nimport javax.tools.StandardLocation;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.UncheckedIOException;\nimport java.io.Writer;\nimport java.nio.charset.Charset;\nimport java.nio.file.Path;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.Iterator;\nimport java.util.LinkedHashMap;\nimport java.util.LinkedHashSet;\nimport java.util.Locale;\nimport java.util.Map;\nimport java.util.Set;\n\nimport org.apache.maven.api.JavaPathType;\n\n/**\n * Workaround for a {@code javax.tools} method which seems not yet supported on all compilers.\n * At least with OpenJDK 24, an {@link UnsupportedOperationException} may occur during the call to\n * {@code fileManager.setLocationForModule(StandardLocation.PATCH_MODULE_PATH, moduleName, paths)}.\n * The workaround is to format the paths in a {@code --patch-module} option instead.\n * The problem is that we can specify this option only once per file manager instance.\n *\n * <p>We may remove this workaround in a future version of the Maven Compiler Plugin\n * if the {@code UnsupportedOperationException} is fixed in a future Java release.\n * For checking if this workaround is still necessary, set {@link #ENABLED} to {@code false}\n * and run the JUnit tests.</p>\n *\n * @author Martin Desruisseaux\n */\nfinal class WorkaroundForPatchModule implements JavaCompiler {\n    /**\n     * Set this flag to {@code false} for testing if this workaround is still necessary.\n     */\n    static final boolean ENABLED = true;\n\n    /**\n     * The actual compiler provided by {@link javax.tools}.\n     */\n    private final JavaCompiler compiler;\n\n    /**\n     * Creates a new workaround as a wrapper for the given compiler.\n     *\n     * @param compiler the actual compiler provided by {@link javax.tools}\n     */\n    WorkaroundForPatchModule(JavaCompiler compiler) {\n        this.compiler = compiler;\n    }\n\n    /**\n     * Forwards the call to the wrapped compiler.\n     *\n     * @return the name of the compiler tool\n     */\n    @Override\n    public String name() {\n        return compiler.name();\n    }\n\n    /**\n     * Forwards the call to the wrapped compiler.\n     *\n     * @return the source versions of the Java programming language supported by the compiler\n     */\n    @Override\n    public Set<SourceVersion> getSourceVersions() {\n        return compiler.getSourceVersions();\n    }\n\n    /**\n     * Forwards the call to the wrapped compiler.\n     *\n     * @return whether the given option is supported and if so, the number of arguments the option takes\n     */\n    @Override\n    public int isSupportedOption(String option) {\n        return compiler.isSupportedOption(option);\n    }\n\n    /**\n     * Forwards the call to the wrapped compiler and wraps the file manager in a workaround.\n     *\n     * @param diagnosticListener a listener for non-fatal diagnostics\n     * @param locale the locale to apply when formatting diagnostics\n     * @param charset the character set used for decoding bytes\n     * @return a file manager with workaround\n     */\n    @Override\n    public StandardJavaFileManager getStandardFileManager(\n            DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset) {\n        return new FileManager(compiler.getStandardFileManager(diagnosticListener, locale, charset), locale, charset);\n    }\n\n    /**\n     * Forwards the call to the wrapped compiler and wraps the task in a workaround.\n     *\n     * @param out destination of additional output from the compiler\n     * @param fileManager a file manager created by {@code getStandardFileManager(…)}\n     * @param diagnosticListener a listener for non-fatal diagnostics\n     * @param options compiler options\n     * @param classes names of classes to be processed by annotation processing\n     * @param compilationUnits the compilation units to compile\n     * @return an object representing the compilation\n     */\n    @Override\n    public CompilationTask getTask(\n            Writer out,\n            JavaFileManager fileManager,\n            DiagnosticListener<? super JavaFileObject> diagnosticListener,\n            Iterable<String> options,\n            Iterable<String> classes,\n            Iterable<? extends JavaFileObject> compilationUnits) {\n        if (fileManager instanceof FileManager wp) {\n            fileManager = wp.getFileManagerIfUsable();\n            if (fileManager == null) {\n                final StandardJavaFileManager workaround =\n                        compiler.getStandardFileManager(diagnosticListener, wp.locale, wp.charset);\n                try {\n                    wp.copyTo(workaround);\n                } catch (IOException e) {\n                    throw new UncheckedIOException(e);\n                }\n                final CompilationTask task =\n                        compiler.getTask(out, workaround, diagnosticListener, options, classes, compilationUnits);\n                return new CompilationTask() {\n                    @Override\n                    public void setLocale(Locale locale) {\n                        task.setLocale(locale);\n                    }\n\n                    @Override\n                    public void setProcessors(Iterable<? extends Processor> processors) {\n                        task.setProcessors(processors);\n                    }\n\n                    @Override\n                    public void addModules(Iterable<String> moduleNames) {\n                        task.addModules(moduleNames);\n                    }\n\n                    @Override\n                    public Boolean call() {\n                        final Boolean result = task.call();\n                        try {\n                            workaround.close();\n                        } catch (IOException e) {\n                            throw new UncheckedIOException(e);\n                        }\n                        return result;\n                    }\n                };\n            }\n        }\n        return compiler.getTask(out, fileManager, diagnosticListener, options, classes, compilationUnits);\n    }\n\n    /**\n     * Not used by the Maven Compiler Plugin.\n     */\n    @Override\n    public int run(InputStream in, OutputStream out, OutputStream err, String... arguments) {\n        return compiler.run(in, out, err, arguments);\n    }\n\n    /**\n     * A file manager which fallbacks on the {@code --patch-module}\n     * option when it cannot use {@link StandardLocation#PATCH_MODULE_PATH}.\n     * This is the class where the actual workaround is implemented.\n     */\n    private static final class FileManager extends ForwardingJavaFileManager<StandardJavaFileManager>\n            implements StandardJavaFileManager {\n        /**\n         * The locale specified by the user when creating this file manager.\n         * Saved for allowing the creation of other file managers.\n         */\n        final Locale locale;\n\n        /**\n         * The character set specified by the user when creating this file manager.\n         * Saved for allowing the creation of other file managers.\n         */\n        final Charset charset;\n\n        /**\n         * All locations that have been successfully specified to the file manager through programmatic API.\n         * This set excludes the {@code PATCH_MODULE_PATH} locations which were defined using the workaround\n         * described in class Javadoc.\n         */\n        private final Set<JavaFileManager.Location> definedLocations;\n\n        /**\n         * The locations that we had to define by formatting a {@code --patch-module} option.\n         * Keys are module names and values are the paths for the associated module.\n         */\n        private final Map<String, Collection<? extends Path>> patchesAsOption;\n\n        /**\n         * Whether the caller needs to create a new file manager.\n         * It happens when we have been unable to set a {@code --patch-module} option on the current file manager.\n         */\n        private boolean needsNewFileManager;\n\n        /**\n         * Creates a new workaround for the given file manager.\n         */\n        FileManager(StandardJavaFileManager fileManager, Locale locale, Charset charset) {\n            super(fileManager);\n            this.locale = locale;\n            this.charset = charset;\n            definedLocations = new LinkedHashSet<>();\n            patchesAsOption = new LinkedHashMap<>();\n        }\n\n        /**\n         * {@return the original file manager, or {@code null} if the caller needs to create a new one}\n         * The returned value is {@code null} when we have been unable to set a {@code --patch-module}\n         * option on the current file manager. In such case, the caller should create a new file manager\n         * and configure it with {@link #copyTo(StandardJavaFileManager)}.\n         */\n        StandardJavaFileManager getFileManagerIfUsable() {\n            return needsNewFileManager ? null : fileManager;\n        }\n\n        /**\n         * Copies the locations defined in this file manager to the given file manager.\n         *\n         * @param target where to copy the locations\n         * @throws IOException if a location cannot be set on the target file manager\n         */\n        void copyTo(final StandardJavaFileManager target) throws IOException {\n            for (JavaFileManager.Location location : definedLocations) {\n                target.setLocation(location, fileManager.getLocation(location));\n            }\n            for (Map.Entry<String, Collection<? extends Path>> entry : patchesAsOption.entrySet()) {\n                Collection<? extends Path> paths = entry.getValue();\n                String moduleName = entry.getKey();\n                try {\n                    target.setLocationForModule(StandardLocation.PATCH_MODULE_PATH, moduleName, paths);\n                } catch (UnsupportedOperationException e) {\n                    specifyAsOption(target, JavaPathType.patchModule(moduleName), paths, e);\n                }\n            }\n        }\n\n        /**\n         * Sets a module path by asking the file manager to parse an option formatted by this method.\n         * Invoked when a module path cannot be specified through the standard <abbr>API</abbr>.\n         * This is the workaround described in class Javadoc.\n         *\n         * @param fileManager the file manager on which an attempt to set the location has been made and failed\n         * @param type the type of path together with the module name\n         * @param paths the paths to set\n         * @param cause the exception that occurred when invoking the standard API\n         * @throws IllegalArgumentException if this workaround doesn't work neither\n         */\n        private static void specifyAsOption(\n                StandardJavaFileManager fileManager,\n                JavaPathType.Modular type,\n                Collection<? extends Path> paths,\n                UnsupportedOperationException cause)\n                throws IOException {\n\n            String message;\n            Iterator<String> it = Arrays.asList(type.option(paths)).iterator();\n            if (!fileManager.handleOption(it.next(), it)) {\n                message = \"Failed to set the %s option for module %s\";\n            } else if (it.hasNext()) {\n                message = \"Unexpected number of arguments after the %s option for module %s\";\n            } else {\n                return;\n            }\n            JavaPathType rawType = type.rawType();\n            throw new IllegalArgumentException(\n                    String.format(message, rawType.option().orElse(rawType.name()), type.moduleName()), cause);\n        }\n\n        /**\n         * Adds the given module path to the file manager.\n         * If we cannot do that using the programmatic API, formats as a command-line option.\n         */\n        @Override\n        public void setLocationForModule(\n                JavaFileManager.Location location, String moduleName, Collection<? extends Path> paths)\n                throws IOException {\n            if (location == StandardLocation.PATCH_MODULE_PATH) {\n                if (patchesAsOption.replace(moduleName, paths) != null) {\n                    /*\n                     * The patch was already specified by formatting the `--patch-module` option.\n                     * We cannot do that again, because that option can appear only once per module.\n                     * We nevertheless stored the new paths in `patchesAsOption` for use by `copyTo(…)`.\n                     */\n                    needsNewFileManager = true;\n                    return;\n                }\n                try {\n                    fileManager.setLocationForModule(location, moduleName, paths);\n                } catch (UnsupportedOperationException e) {\n                    specifyAsOption(fileManager, JavaPathType.patchModule(moduleName), paths, e);\n                    patchesAsOption.put(moduleName, paths);\n                    return;\n                }\n            } else {\n                fileManager.setLocationForModule(location, moduleName, paths);\n            }\n            definedLocations.add(fileManager.getLocationForModule(location, moduleName));\n        }\n\n        /**\n         * Adds the given path to the file manager.\n         */\n        @Override\n        public void setLocationFromPaths(JavaFileManager.Location location, Collection<? extends Path> paths)\n                throws IOException {\n            fileManager.setLocationFromPaths(location, paths);\n            definedLocations.add(location);\n        }\n\n        @Override\n        public void setLocation(Location location, Iterable<? extends File> files) throws IOException {\n            fileManager.setLocation(location, files);\n            definedLocations.add(location);\n        }\n\n        @Override\n        public Iterable<? extends File> getLocation(Location location) {\n            return fileManager.getLocation(location);\n        }\n\n        @Override\n        public Iterable<? extends Path> getLocationAsPaths(Location location) {\n            return fileManager.getLocationAsPaths(location);\n        }\n\n        @Override\n        public Iterable<? extends JavaFileObject> getJavaFileObjects(String... names) {\n            return fileManager.getJavaFileObjects(names);\n        }\n\n        @Override\n        public Iterable<? extends JavaFileObject> getJavaFileObjects(File... files) {\n            return fileManager.getJavaFileObjects(files);\n        }\n\n        @Override\n        public Iterable<? extends JavaFileObject> getJavaFileObjects(Path... paths) {\n            return fileManager.getJavaFileObjects(paths);\n        }\n\n        @Override\n        public Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names) {\n            return fileManager.getJavaFileObjectsFromStrings(names);\n        }\n\n        @Override\n        public Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files) {\n            return fileManager.getJavaFileObjectsFromFiles(files);\n        }\n\n        @Override\n        public Iterable<? extends JavaFileObject> getJavaFileObjectsFromPaths(Collection<? extends Path> paths) {\n            return fileManager.getJavaFileObjectsFromPaths(paths);\n        }\n\n        @Override\n        public Path asPath(FileObject file) {\n            return fileManager.asPath(file);\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/apache/maven/plugin/compiler/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 * Maven Compiler Plugin <abbr>MOJO</abbr>.\n * The {@link org.apache.maven.plugin.compiler.CompilerMojo}\n * and {@link org.apache.maven.plugin.compiler.TestCompilerMojo}\n * classes contain the configuration for compiling the main source code and the tests respectively.\n * These classes are mutable as they can be extended and have their properties modified in subclasses.\n * However, the actual compilation is performed by {@link org.apache.maven.plugin.compiler.ToolExecutor},\n * which takes a snapshot of the <abbr>MOJO</abbr> at construction time. After the test executor has been\n * created, it can be executed safely in a background thread even if the <abbr>MOJO</abbr> is modified concurrently.\n */\npackage org.apache.maven.plugin.compiler;\n"
  },
  {
    "path": "src/site/apt/usage.apt.vm",
    "content": " ------\n Usage\n ------\n Edwin Punzalan\n ------\n 2006-07-05\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~~ NOTE: For help with the syntax of this file, see:\n~~ http://maven.apache.org/doxia/references/apt-format.html\n\nUsage\n\n* Compiling Your Java Sources\n\n  The goals for the Compiler Plugin are bound to their respective phases in the\n  build lifecycle.  So to compile your sources, you need only to tell maven\n  until which lifecycle to execute.  The following will compile your sources:\n\n+-----\nmvn compile\n+-----\n\n  To compile your test sources, you'll do:\n\n+-----\nmvn test-compile\n+-----\n\n  The above command will execute both <<<compiler:compile>>> and\n  <<<compiler:testCompile>>> since the <<<compile>>> phase happens a few phases\n  before the <<<test-compile>>> phase.\n\n* Configuring Your Compiler Plugin\n\n  Since the Compiler Plugin executes automatically during their phases, you\n  don't have to put <<<executions>>> unlike many other plugins. However, you\n  should specify the version of the Compiler Plugin.\n\n+-----\n<project>\n  ...\n  <build>\n    <pluginManagement>\n      <plugins>\n        <plugin>\n          <groupId>org.apache.maven.plugins</groupId>\n          <artifactId>maven-compiler-plugin</artifactId>\n          <version>${project.version}</version>\n          <configuration>\n            <!-- put your configurations here -->\n          </configuration>\n        </plugin>\n      </plugins>\n    </pluginManagement>\n  </build>\n  ...\n</project>\n+-----\n\n"
  },
  {
    "path": "src/site/fml/faq.fml",
    "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<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  title=\"Frequently Asked Questions\">\n  <part id=\"General\">\n    <faq id=\"how-to-add-generated-sources\">\n      <question>How do I add my generated sources to the compile path of Maven, when using Modello?</question>\n      <answer>\n        <p>Modello generate the sources in the generate-sources phase and automatically adds the\n          source directory for compilation in Maven. So you don't have to copy the generated sources.\n        </p>\n        <p>You have to declare the <a href=\"https://codehaus-plexus.github.io/modello/modello-maven-plugin/\">Modello Maven Plugin</a>\n          in the build of your project for source generation (in that way the sources are generated each time).\n        </p>\n        <p>For more information about Modello, please visit the\n          <a href=\"https://codehaus-plexus.github.io/modello/\">Modello website</a>.\n        </p>\n      </answer>\n    </faq>\n  </part>\n</faqs>\n"
  },
  {
    "path": "src/site/markdown/examples/annotation-processor.md",
    "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\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# Annotation processors\n\n[Annotation processing](https://docs.oracle.com/en/java/javase/23/docs/specs/man/javac.html#annotation-processing) is used to let the compiler generate source code based on annotations.\nFor example, the [Hibernate Processor](https://hibernate.org/orm/processor/) provides an annotation processor to generate the JPA metamodel.\n\n\n## Recommended way to activate annotation processing\n\nUp to JDK 23, the compiler automatically scanned the classpath for annotation processors and executed all found by default.\nFor security reasons, this got disabled by default since JDK 23 and annotation processing needs to be activated explicitly.\nThe recommended way for this is to list all desired processors using either the `<annotationProcessors>` plugin configuration\nor, when using Maven 4 and Maven Compiler Plugin version 4.x, by declaring the processors as dependencies of type `processor`. `classpath-processor` or `modular-processor`.\nOnly those processors will get executed by the compiler.\n\nThe following example shows how to activate the Hibernate Processor.\n\n\n### Maven 3\n\nWhen using Maven 3 and Maven Compiler Plugin version 3.x you do this using the following configuration.\n\n```xml\n<project>\n  <build>\n    <plugins>\n      [...]\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>...</version>\n        <configuration>\n          <annotationProcessorPaths>\n            <path>\n              <groupId>org.hibernate.orm</groupId>\n              <artifactId>hibernate-processor</artifactId>\n              <version>${version.hibernate}</version>\n            </path>\n          </annotationProcessorPaths>\n        </configuration>\n      </plugin>\n      [...]\n    </plugins>\n  </build>\n</project>\n```\n\n\n### Maven 4\n\nWith Maven 4 and Maven Compiler Plugin 4.x the way described above got deprecated and will be removed in a future version of the plugin.\nConfiguration now makes use of the new `processor` dependency type to shorten the configuration,\ngive control over the placement on class-path or module-path, and make the information available to other plugins.\nThe following example shows this.\n\n```xml\n<project>\n  <dependencies>\n    [...]\n    <dependency>\n      <groupId>org.hibernate.orm</groupId>\n      <artifactId>hibernate-processor</artifactId>\n      <version>${version.hibernate}</version>\n      <type>processor</type>\n    </dependency>\n    [...]\n  </dependencies>\n</project>\n```\n\nLike ordinary dependencies, processors can be placed on the processor class-path or processor module-path.\nEach processor can be placed explicitly on one of those two kinds of path by specifying the\n`classpath-processor` or `modular-processor` dependency type respectively.\nIf the specified type is only `processor`, then the Maven compiler plugin will try to guess on which path to place the processor.\nNote that this guess is not guaranteed to be correct.\nDevelopers are encouraged to declare a more explicit type (for example `<type>classpath-processor</type>`) when they know how the processor is intended to be used.\n\n\n## Not recommended: Using the `proc` configuration\n\nThis section applies to Maven 3 and Maven 4.\n\nIf you don't want to provide a list of processors, you have to set the value of the `<proc>` configuration to either `only` or `full`.\nThe first will only scan the classpath for annotation processors and will execute them, while the later will also compile the code afterward.\nKeep in mind that if no list of desired annotation processors is provided, using the `<proc>` configuration will execute found processors on the classpath.\n**This might result in the execution of hidden and possible malicious processors.**\nTherefore, using only the `proc` configuration is not recommended.\n\nYou set the value of the `<proc>` configuration like every other [configuration](/usage.html) of the Maven Compiler Plugin:\n\n```xml\n<project>\n  [...]\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>...</version>\n        <configuration>\n          <proc>full</proc>\n        </configuration>\n      </plugin>\n      [...]\n    </plugins>\n    [...]\n  </build>\n</project>\n```\n\nYou can also just overwrite the default value of the property:\n\n```xml\n<project>\n  [...]\n  <properties>\n    <maven.compiler.proc>full</maven.compiler.proc>\n  </properties>\n  [...]\n</project>\n```\n"
  },
  {
    "path": "src/site/markdown/examples/compile-using-different-jdk.md",
    "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\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# Compiling Sources Using A Different JDK\n\n## Using Maven Toolchains\n\nThe preferable way to use a different JDK is to use the toolchains mechanism.\nDuring the build of a project, Maven, without toolchains, will use the JDK to perform various steps,\nlike compiling the Java sources, generate the Javadoc, run unit tests or sign JARs.\nEach of those plugins need a tool of the JDK to operate: `javac`, `javadoc`, `jarsigner`, etc.\nA toolchain is a way to specify the path to the JDK to use for all of those plugins in a centralized manner,\nindependent from the one running Maven itself.\n\nTo set this up, refer to the [Guide to Using Toolchains](http://maven.apache.org/guides/mini/guide-using-toolchains.html),\nwhich makes use of the [Maven Toolchains Plugin](http://maven.apache.org/plugins/maven-toolchains-plugin/).\n\nWith the maven-toolchains-plugin you configure 1 default JDK toolchain for all related maven-plugins.\nSince maven-compiler-plugin 3.6.0 when using with Maven 3.3.1+ it is also possible to give the plugin its own toolchain,\nwhich can be useful in case of different JDK calls per execution block\n(e.g. the test sources require a different compiler compared to the main sources).\n\n\n## Configuring the Compiler Plugin\n\nOutside of a toolchain, it is still possible to tell the Compiler Plugin the specific JDK to use during compilation.\nNote that such configuration will be specific to this plugin, and will not affect others.\nIf the `fork` parameter is set to `true`, the executable at the specified path will be used.\nThe following example uses a `JAVA_11_HOME` property which needs to be set by each developer,\nas discussed in the next paragraph.\n\n```xml\n<project>\n  [...]\n  <build>\n    [...]\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>...</version>\n        <configuration>\n          <verbose>true</verbose>\n          <fork>true</fork>\n          <executable>${JAVA_11_HOME}/bin/javac</executable>\n        </configuration>\n      </plugin>\n    </plugins>\n    [...]\n  </build>\n  [...]\n</project>\n```\n\nThe above example uses a `JAVA_11_HOME` property in order to avoid hard-coding a filesystem path for the executable.\nEach developer defines this property in [settings.xml](http://maven.apache.org/ref/current/maven-settings/settings.html),\nor sets an environment variable, so that the build remains portable.\n\n```xml\n<settings>\n  [...]\n  <profiles>\n    [...]\n    <profile>\n      <id>compiler</id>\n      <properties>\n        <JAVA_11_HOME>/usr/lib/jvm/java-11-openjdkk</JAVA_11_HOME>\n      </properties>\n    </profile>\n  </profiles>\n  [...]\n  <activeProfiles>\n    <activeProfile>compiler</activeProfile>\n  </activeProfiles>\n</settings>\n```\n\nIf you build with a different JDK, you may want to\n[customize the jar file manifest](http://maven.apache.org/plugins/maven-jar-plugin/examples/manifest-customization.html).\n"
  },
  {
    "path": "src/site/markdown/examples/compile-with-memory-enhancements.md",
    "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\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# Compile Using Memory Allocation Enhancements\n\nThe Compiler Plugin accepts configurations for initial memory (`meminitial`)\nand maximum memory (`maxmem`).\nYou can follow the example below to set the initial memory size to 128MB\nand the maximum memory usage to 512MB:\n\n```xml\n<project>\n  [...]\n  <build>\n    [...]\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>...</version>\n        <configuration>\n          <fork>true</fork>\n          <meminitial>128m</meminitial>\n          <maxmem>512m</maxmem>\n        </configuration>\n      </plugin>\n    </plugins>\n    [...]\n  </build>\n  [...]\n</project>\n```\n\nVersion 4 of the Maven compiler plugin additionally accepts the 'k', 'M' (upper-case)\nand 'G' suffixes for kilobytes, megabytes and gigabytes respectively.\n"
  },
  {
    "path": "src/site/markdown/examples/jpms_args.md",
    "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\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# Arguments related to Java Platform Module System\n\nJava 9 comes with a new set of arguments related to the Java Platform Modular System (JPMS).\nBesides the module path there are other new arguments which can change the behavior of the application.\nThese can be used during both compile time and runtime.\nExcept the module path, these extra arguments should not be needed for compilation and execution of the main code\n(if they are needed, then maybe the `module-info.java` file is incomplete).\nBut they may be needed for compilation and execution of tests.\nIn such case, at runtime it is useful to know which extra arguments were used at compile time.\n\n\n## Debugging information\n\nIf the compilation fails, version 4 of the Maven Compiler Plugin generates one of the following files,\ndepending on which scope (main or test) cannot be compiled:\nThese files are usually not generated when the build is successful,\nbut their generation can be forced by providing the `--verbose` option to the `mvn` command.\n\n* Main: `target/javac.args`\n* Test: `target/javac-test.args`\n\nThe following arguments are of particular interest, because they may be required at runtime.\nThese arguments should appear in the `javac-test.args` file only, not in `javac.args`.\n\n  * `--upgrade-module-path`\n  * `--add-exports`\n  * `--add-reads`\n  * `--add-modules`\n  * `--limit-modules`\n  * `--patch-module`\n"
  },
  {
    "path": "src/site/markdown/examples/module-info.md",
    "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\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# Java 9+ projects with module-info\n\nIf a project with a `module-info.java` file does not need to be compatible with Java 8 or earlier environment,\nthere is nothing special to do.\n\n\n# Java 8 projects with module-info\n\nProjects that want to be compatible with older versions of Java (i.e, 8 or below bytecode and API),\nbut also want to provide a `module-info.java` for use on Java 9+ runtime,\nmust be aware that they need to call `javac` twice:\n\n1. the `module-info.java` must be compiled with `release` set to 9 or later,\n2. the rest of the sources must be compiled with the lower expected compatibility version of source/target.\n\nA way to do this is by having two execution blocks, as described below:\n\n1. default `default-compile` execution with `release` set to 9 or later,\n2. additional custom `base-compile` execution with expected target compatibility.\n\nThe following snippet gives an example.\nThis snippet assumes that the JDK used by Maven supports the `--release 8` option.\nIt may not be the case for all JDKs, as newer JDKs may drop the support of Java versions that are too old.\n\n```xml\n<project>\n  [...]\n  <build>\n    [...]\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>...</version>\n        <executions>\n          <execution>\n            <id>default-compile</id>\n            <configuration>\n              <release>9</release>\n              <!-- no excludes: compile everything to ensure module-info contains right entries -->\n            </configuration>\n          </execution>\n          <execution>\n            <id>base-compile</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n            <configuration>\n              <release>8</release>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n    </plugins>\n    [...]\n  </build>\n  [...]\n</project>\n```\n\nIf the JDK used by Maven does not support the `--release 8` option,\nthen projects which want to be compatible with old Java versions need to use two different JDKs for the two executions.\nUsing a [toolchains](/guides/mini/guide-using-toolchains.html) configuration, it is possible to achieve this, even if more complex.\nIn above snippet, the following fragment:\n\n```xml\n              <release>8</release>\n```\n\ncan be replaced by:\n\n```xml\n              <source>1.8</source>\n              <target>1.8</target>\n              <jdkToolchain>\n                <version>1.8</version>\n              </jdkToolchain>\n```\n"
  },
  {
    "path": "src/site/markdown/examples/non-javac-compilers.md",
    "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\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# Using Non-Javac Compilers\n\nContrary to this plugin's name, the Compiler Plugin does not compile the\nsources of your project by itself. To compile, the Compiler Plugin uses\nanother class to compile them.\n\nThe parameter `compilerId` determines which class will be used.\n\nBy default, the version 4 of Maven Compiler Plugin uses the `javac` compiler\nbundled in the `javax.tools` package of the standard Java library.\nBut it is possible to use any other compiler, as long the\nimplementation declares itself as a `javax.tools.JavaCompiler` service.\nTo use such an implementation:\n\n* Add the compiler implementation in the Maven compiler plugin dependencies.\n* Declare the compiler's identifier in the `compilerId` element of the Maven plugin configuration.\n  The identifier value shall be the value returned by the `JavaCompiler.name()` method of the implementation.\n\nThe example below shows how to use the Eclipse compiler `ecj`.\nNote: This configuration requires Maven 4 with Maven Compiler Plugin 4.\n\n```xml\n<project>\n  [...]\n  <build>\n    [...]\n    <plugins>\n      [...]\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>...</version>\n        <configuration>\n          <compilerId>ecj</compilerId>\n        </configuration>\n        <dependencies>\n          <dependency>\n            <groupId>org.eclipse.jdt</groupId>\n            <artifactId>ecj</artifactId>\n            <version>...</version>\n          </dependency>\n        </dependencies>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n```\n\n\n## Maven 3\n\nVersion 3 of the Maven Compiler Plugin does not use the compiler directly.\nInstead, it uses an intermediate layer called the Plexus Compiler.\nThe [Plexus Compiler](https://codehaus-plexus.github.io/plexus-compiler/) component\nhas some compiler identifiers available under the group `org.codehaus.plexus`.\nTo use any of the non-javac compilers with version 3.x of the Maven Compiler plugin,\nyou need to declare a dependency to the Plexus artifact in your project's `pom.xml`.\nThe example below shows how to use the `csharp` compiler:\n\n```xml\n<project>\n  [...]\n  <build>\n    [...]\n    <plugins>\n      [...]\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>...</version>\n        <configuration>\n          <compilerId>csharp</compilerId>\n        </configuration>\n        <dependencies>\n          <dependency>\n            <groupId>org.codehaus.plexus</groupId>\n            <artifactId>plexus-compiler-csharp</artifactId>\n            <version>...</version>\n          </dependency>\n        </dependencies>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n```\n"
  },
  {
    "path": "src/site/markdown/examples/pass-compiler-arguments.md",
    "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\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# Pass Compiler Arguments\n\nSometimes, you need to pass compiler arguments that are not handled by the Compiler Plugin itself.\nFor such arguments, use the Compiler Plugin's `compilerArgs` parameter.\nThe following example passes compiler arguments to the `javac` compiler:\n\n```xml\n<project>\n  [...]\n  <build>\n    [...]\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>...</version>\n        <configuration>\n          <compilerArgs>\n            <arg>-verbose</arg>\n            <arg>-Xlint:all</arg>\n          </compilerArgs>\n        </configuration>\n      </plugin>\n    </plugins>\n    [...]\n  </build>\n  [...]\n</project>\n```\n"
  },
  {
    "path": "src/site/markdown/examples/set-compiler-release.md",
    "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\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# Setting the `--release` of the Java Compiler\n\nStarting with JDK 9, the `javac` executable can accept the `--release` option\nto specify against which Java SE release you want to build the project.\nFor example, you have JDK 17 installed and used by Maven,\nbut you want to build the project against Java 11.\nThe `--release` option ensures that the code is compiled following\nthe rules of the programming language of the specified release,\nand that generated classes target the release as well as the public API of that release.\nThis means that, unlike the old `--source` and `--target` options,\nthe compiler will detect and generate an error when using APIs that don't exist in previous releases of Java SE.\n\nThe preferred was to specify the release depends on the Maven version in use.\n\n## Maven 3\nSince version 3.6 of the Compiler Plugin, this option can be provided either via a property:\n\n```xml\n<project>\n  [...]\n  <properties>\n    <maven.compiler.release>8</maven.compiler.release>\n  </properties>\n  [...]\n</project>\n```\n\nor by configuring the plugin directly:\n\n```xml\n<project>\n  [...]\n  <build>\n    [...]\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>...</version>\n        <configuration>\n          <release>11</release>\n        </configuration>\n      </plugin>\n    </plugins>\n    [...]\n  </build>\n  [...]\n</project>\n```\n\n## Maven 4\nSince version 4 of the compiler plugin, which requires Maven 4,\nthe preferred way to specify the release is together with the source declaration.\nThis is the recommended way because it makes the creation of\n[multi-release](../multirelease.html) projects easier.\n\n```xml\n<project>\n  [...]\n  <sources>\n    <source>\n      <targetVersion>11</targetVersion>\n    </source>\n  </sources>\n  [...]\n</project>\n```\n\n**Note:** The value in the `release` parameter follows\n[Java's new Version-String Scheme (JEP 223)](https://openjdk.org/jeps/223) adopted since Java 9.\nAs such, the release number does not start with 1.x anymore.\nAlso note that the supported `release` targets include the release of the currently used JDK\nplus a limited number of previous releases.\n"
  },
  {
    "path": "src/site/markdown/examples/set-compiler-source-and-target.md",
    "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\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# Setting the `--source` and `--target` of the Java Compiler\n\n**Using `--source` and `--target` options is not recommended.**\nIf you're are using version 3.13.0 or newer of the Compiler Plugin,\nuse the recommended [release](./set-compiler-release.html) configuration instead.\n\nSometimes you may need to compile a certain project to a different version than what you are currently using.\nThe `javac` command can accept such options using `--source` and `--target`.\nThe Compiler Plugin can also be configured to provide these options during compilation.\nYou have to set the version following [Java's new Version-String Scheme (JEP 223)](https://openjdk.org/jeps/223).\n\nFor example, if you want to use the Java 8 language features and also want the compiled classes to be compatible with JVM 8 (former 1.8),\nyou can either add the two following properties, which are the default property names for the plugin parameters:\n\n```xml\n<project>\n  [...]\n  <properties>\n    <maven.compiler.source>8</maven.compiler.source>\n    <maven.compiler.target>8</maven.compiler.target>\n  </properties>\n  [...]\n</project>\n```\n\nor configure the plugin directly:\n\n```xml\n<project>\n  [...]\n  <build>\n    [...]\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <version>...</version>\n        <configuration>\n          <source>8</source>\n          <target>8</target>\n        </configuration>\n      </plugin>\n    </plugins>\n    [...]\n  </build>\n  [...]\n</project>\n```\n\n**Note:** Merely setting the `target` option does not guarantee that your code actually runs on a JDK with the specified version.\nThe pitfall is unintended usage of APIs that only exist in later JDKs which would make your code fail at runtime with a linkage error.\nTo avoid this issue, you can either configure the compiler's boot classpath to match the target JDK,\nor use the [Animal Sniffer Maven Plugin](http://www.mojohaus.org/animal-sniffer/animal-sniffer-maven-plugin/)\nto verify your code doesn't use unintended APIs,\nor better yet use the [release](./set-compiler-release.html) option.\n\nIn the same way, setting the `source` option does not guarantee that your code actually compiles on a JDK with the specified version.\nTo compile your code with a specific JDK version, different than the one used to launch Maven,\nrefer to the [Compile Using A Different JDK](./compile-using-different-jdk.html) example.\n"
  },
  {
    "path": "src/site/markdown/index.md",
    "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\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\nThe Compiler Plugin is used to compile the sources of your project.\nThe default compiler used to compile Java sources is `javac`.\nIf you want to use another compiler, refer to the [using Non-Javac Compilers](./examples/non-javac-compilers.html) page.\n\n**NOTE:** To know more about the JDK `javac`, please see the\n[tool guide](https://docs.oracle.com/en/java/javase/24/docs/specs/man/javac.html).\n\n# Goals Overview\n\nThe Compiler Plugin has two goals.\nBoth are already bound to their proper phases within the Maven Lifecycle and are therefore,\nautomatically executed during their respective phases.\n\n* [compiler:compile](./compile-mojo.html) is bound to the compile phase and is used to compile the main source files.\n* [compiler:testCompile](./testCompile-mojo.html) is bound to the test-compile phase and is used to compile the test source files.\n\n# Usage\n\nGeneral instructions on how to use the Compiler Plugin can be found on the [usage page](./usage.html).\nSome more specific use cases are described in the examples given below.\n\nIn case you still have questions regarding the plugin's usage, please have a look at the [FAQ](./faq.html)\nand feel free to contact the [user mailing list](./mailing-lists.html).\nThe posts to the mailing list are archived and could already contain the answer to your question as part of an older thread.\nHence, it is also worth browsing/searching the [mail archive](./mailing-lists.html).\n\nIf you feel the plugin is missing a feature or has a defect,\nyou can file a feature request or bug report in our [issue tracker](./issue-management.html).\nWhen creating a new issue, please provide a comprehensive description of your concern.\nEspecially for fixing bugs it is crucial that the developers can reproduce your problem.\nFor this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated.\nOf course, patches are welcome, too.\nContributors can check out the project from our [source repository](./scm.html) and will find supplementary information\nin the [guide to helping with Maven](http://maven.apache.org/guides/development/guide-helping.html).\n\nThe following pages describes how to use the plugin beyond the default\n\"one source directory, one module, one release\" default configuration:\n\n* [Declaration of source directories](./sources.html)\n* [Multi-release project](./multirelease.html)\n* [Modular project](./modules.html)\n* [Module-info patch for tests](./module-info-patch.html)\n\n\n# Examples\n\nTo provide you with better understanding on some usages of the Compiler Plugin,\nyou can take a look into the following examples:\n\n* [Annotation processors](./examples/annotation-processor.html)\n* [Arguments related to Java Platform Module System](./examples/jpms_args.html)\n* [Compile using a different JDK](./examples/compile-using-different-jdk.html)\n* [Compile using a non-javac compilers](./examples/non-javac-compilers.html)\n* [Compile using the --source and --target javac options](./examples/set-compiler-source-and-target.html)\n* [Compile using the --release javac option](./examples/set-compiler-release.html)\n* [Compile using memory allocation enhancements](./examples/compile-with-memory-enhancements.html)\n* [Java 9+ projects with module-info](./examples/module-info.html)\n* [Pass compiler arguments](./examples/pass-compiler-arguments.html)\n"
  },
  {
    "path": "src/site/markdown/module-info-patch.md",
    "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\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# Module-info patch\n\nFor white box testing, it is necessary to use compiler options such as\n`--patch-module`, `--add-modules`, `--add-reads`, `--add-exports` and `--add-opens`.\nWriting these options inside the Maven `<compilerArgs>` XML element is tedious, redundant\n(the name of the module to patch is repeated in every occurrence of some options), error prone,\nand must be repeated in every plugins that depends on the tests (Surefire, Javadoc for test documentation, _etc._).\nAn alternative is to put a `module-info.java` file in the tests which *replace* the `module-info.java` file of the main code.\nHowever, it forces the developer to repeat all the content of the main `module-info.java`\ninto the test `module-info.java` before to add test-specific statements.\nThis is tedious if the main `module-info.java` is large, and risky if the two files become out of sync.\n\nInstead of defining a `module-info.java` file in test, Maven projects can define a `module-info-patch.maven`.\nThe content of `module-info-patch.maven` uses the same syntax as Java, C/C++, JavaScript, Groovy, _etc._\n(comments between `/*` … `*/` or after `//`, blocks between `{` … `}`, statements ending with `;`)\nbut is not Java, hence the `.maven` file suffix.\nThe general principles are:\n\n* Everything that a developer would like to change in a `module-info.java` file for testing purposes is declared in `module-info-patch.maven`.\n* Everything that is not in `module-info.java` is not in `module-info-patch.maven` neither.\n  In particular, everything that specify paths to JAR files or paths to source code stay in the `pom.xml` file.\n* All keywords except `patch-module`, `SUBPROJECT-MODULES` and `TEST-MODULE-PATH`\n  map directly to Java compiler or Java launcher options.\n\nCompared to declaring options in `<compilerArgs>` XML elements, the `module-info-patch.maven` file is more readable,\nkeep the options in separated files for each module on which the options are applied, is less redundant as it avoids\nthe need to repeat the module name in every `--add-reads`, `--add-exports` and `--add-opens` options,\nand is more flexibly as it is translated in slightly different options for compilation and test executions\n(e.g. `TEST-MODULE-PATH` means modules having `test` and `test-only` Maven's scope at compilation time,\nbut means modules having `test` and `test-runtime` Maven's scope at execution time).\n\n\n## Syntax\n\nThe syntax is:\n\n* The same styles of comment as Java (`/*` … `*/` and `//`) are accepted.\n* The first tokens, after comments, shall be `patch-module` followed by the name of the module to patch.\n* All keywords inside `patch-module` are Java compiler or Java launcher options without the leading `--` characters.\n* Each option value ends at the `;` character, which is mandatory.\n\nThe accepted keywords are `add-modules`, `limit-modules`, `add-reads`, `add-exports` and `add-opens`.\nNote that they are options where the values are package or module names, not paths to source or binary files.\nOptions with path values (`--module-path`, `--module-source-path`, `--patch-module`, _etc._)\ncontinue to be derived from the dependencies declared in the POM.\n\n\n### Options applying to all modules\n\nAll options declared in a `module-info-patch.maven` file apply only to the module declared after the `patch-module` token,\nexcept the `--add-modules` and `--limit-modules` options.\nThese two options apply to all modules in a multi-modules project,\nbecause these options given to `java` or `javac` expect no module name.\nTherefore, it is not necessary to repeat `add-modules TEST-MODULE-PATH` in all modules:\ndeclaring that particular option in only one module of a multi-modules project is sufficient.\nIf the `--add-modules` or `--limit-modules` options are declared in many `module-info-patch.maven` files of a multi-modules project,\nthen the effective value is the union of the values declared in each file, without duplicated values.\n\n\n### Special option values\n\nThe following option values have special meanings:\n\n* `SUBPROJECT-MODULES`: all other modules in the current Maven (sub)project.\n  * This is Maven-specific, not a standard value recognized by Java tools.\n  * Allowed in: `add-exports`.\n* `TEST-MODULE-PATH`: all dependencies having a test scope in the build tools.\n  * This is specific to this format, not a standard value recognized by Java tools.\n  * Allowed in: `add-modules`, `add-reads` and `add-exports` options.\n* `ALL-MODULE-PATH`: everything on the module path, regardless if test or main.\n  * This is a standard value accepted by the Java compiler.\n  * Allowed in: `add-modules` option.\n* `ALL-UNNAMED`: all non-modular dependencies.\n  * This is a standard value accepted by the Java compiler.\n  * Allowed in: `add-exports` option.\n\n\n## Example\n\nBelow is an example of a `module-info-patch.maven` file content\nfor modifying the `module-info` of a module named `org.foo.bar`:\n\n```java\n/*\n * The same comments as in Java are allowed.\n */\npatch-module org.foo.bar {                // Put here the name of the module to patch.\n    add-modules TEST-MODULE-PATH;         // Recommended value in the majority of cases.\n\n    add-reads org.junit.jupiter.api,      // Frequently used dependency for tests.\n              my.product.test.fixture;    // Put here any other dependency needed for tests.\n\n    add-exports org.foo.bar.internal      // Name of a package which is normally not exported.\n             to org.junit.jupiter.api,    // Any module that need access to above package for testing.\n                org.something.else;       // Can export to many modules, as a coma-separated list.\n\n    add-exports org.foo.bar.fixtures      // Another package to export. It may be a package defined in the tests.\n             to org.foo.bar.other;        // Another module of this project which may want to reuse test fixtures.\n}\n```\n\n\n### How module info patches are compiled\n\n`module-info-patch.maven` are compiled into a file of options in the following ways:\n\n* `add-modules org.foo, org.bar;` is translated to `--add-modules org.foo,org.bar`.\n  * Note: spaces between `org.foo` and `org.bar` are removed for interpreting the option values as a single argument.\n* `limit-modules org.foo, org.bar;` is translated to `--limit-modules org.foo,org.bar`.\n  * Note: idem regarding spaces removal.\n* `add-reads org.foo, org.bar;` is translated to `--add-reads org.patched=org.foo,org.bar`\n  where `org.patched` is the module name declared in the first statement of the `module-info-patch` file.\n* `add-exports com.biz to org.foo, org.bar;` is translated to `--add-exports org.patched/com.biz=org.foo,org.bar`\n  where `org.patched` is as above.\n* `add-opens com.biz to org.foo, org.bar;` is translated to `--add-opens org.patched/com.biz=org.foo,org.bar`\n  like above but only for runtime execution, not for compilation.\n\nThere is a separated `module-info-patch.maven` file for each module,\nand the Maven compiler plugin merges them in a single set of options for `java` and `javac`.\nWhile this format does not require the use of module source hierarchy, it fits nicely in that hierarchy.\n\nThe results of the translation to compiler options can be seen in the `target/javac.args` and `target/javac-test.args` files.\nThose files are produced when the build failed or when Maven was executed with the `--verbose` command-line option.\nIn addition, a slightly different set of options, suitable for tests execution, is written in the\n`target/test-classes/META-INF/maven/module-info-patch.args` file.\n"
  },
  {
    "path": "src/site/markdown/modules.md",
    "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\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# Modular projects\n\nThe Maven 3 way to make a modular project is to put a `module-info.java` file in the root directory of Java source files.\nBecause the compilation and execution of tests usually require an amended version of module information,\nMaven 3 allows to overwrite that file with another `module-info.java` file placed in the test source directory.\nWhile this approach is still supported in Maven 4 for compatibility reasons,\nit is deprecated and may no longer be supported in a future version.\nDevelopers are encouraged to migrate to the approach described below.\n\n\n## Maven 3\n\nThe directory layout of a modular project in Maven 3 was as below:\n\n```\nsrc\n├─ main\n│  └─ java\n│     ├─ module-info.java\n│     └─ org/foo/bar/*.java\n├─ test\n│  └─ java\n│     ├─ module-info.java     (optional)\n│     └─ org/foo/bar/*.java\n└─ target\n   └─ classes\n      └─ org/foo/bar/*.class\n```\n\nAn alternative to the `test/java/module-info.java` file is to declare compiler arguments\nsuch as `--add-reads` in the `<testCompilerArgs>` element of the plugin configuration.\n\n\n## Maven 4 with package hierarchy\n\nMaven 4 allows the same directory layout as Maven 3.\nHowever, the `module-info.java` file in the test directory *should* be\nreplaced by a `module-info-patch.maven` file in the same directory.\n\n```\nsrc\n├─ main\n│  └─ java\n│     ├─ module-info.java\n│     └─ org/foo/bar/*.java\n├─ test\n│  └─ java\n│     ├─ module-info-patch.maven   (optional)\n│     └─ org/foo/bar/*.java\n└─ target\n   └─ classes\n      └─ org/foo/bar/*.class\n```\n\nThe Maven compiler automatically adds `--patch-module`, `--add-modules` and `--add-reads` arguments for compiling the tests.\nIf more `--add-reads` arguments are needed, or if `--add-modules`, `--add-exports` or `--add-opens` arguments are also needed,\nthen a `module-info-patch.maven` file (syntax described below) can be placed in the `test/java` directory.\nThis Maven file is preferred to a `module-info.java` file in the test directory because the Maven file\n*completes* the main `module-info.class` (using compiler arguments) instead of *replacing* it.\n\n\n### Limitation\n\nWhen using the package hierarchy, problems may occur if the module name is a single name without `.` separator\n(for example, `foo` or `bar` but not `foo.bar`) and that name is identical to a package name.\nIn such case, the hack implemented in the Maven compiler plugin for Maven 3 compatibility\nbecome confused about whether a directory named `foo` represents the module or the package.\nFor avoiding ambiguity, use module names containing at least one `.` character\n(as it should be when using the reverse domain name convention)\nor use the module source hierarchy described below.\n\n\n## Maven 4 with module source hierarchy\n\nThe [module source hierarchy](https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#directory-hierarchies)\nintroduces one additional directory level in the paths to source Java files and to compiled classes.\nThe name of this directory is the Java module name,\nand the directory is always present even in projects containing only one module.\nMore than one Java module can be present in the same Maven sub-project.\nSuch multi-module projects have advantages such as resolving compiler warnings\nin forward references to dependent modules and easier sharing of test code between modules.\nFor example, a Maven project for a single Java module named `org.foo.bar` would have the following directory layout:\n\n```\nsrc\n├─ org.foo.bar\n│  ├─ main\n│  │  └─ java\n│  │     ├─ module-info.java\n│  │     └─ org/foo/bar/*.java\n│  └─ test\n│     └─ java\n│        ├─ module-info-patch.maven   (optional)\n│        └─ org/foo/bar/*.java\n└─ target\n   └─ classes\n      └─ org.foo.bar\n         └─ org/foo/bar/*.class\n```\n\nNote that the output directory also contains an `org.foo.bar` directory level.\nThat directory level is generated by `javac`. This is not a convention invented by Maven.\n\nThe above layout can be declared with the following fragment in the `pom.xml` file.\nSince this example uses the default directory layout for modular projects,\nthe `<directory>` elements do not need to be specified.\n\n```xml\n<build>\n  <sources>\n    <source>\n      <module>org.foo.bar</module>\n    </source>\n    <source>\n      <scope>test</scope>\n      <module>org.foo.bar</module>\n    </source>\n  </sources>\n</build>\n```\n\n## Black Box testing\n\n\"Black Box testing\" refers to tests executed without access to the internal code of the project to test.\nInternal code includes package-private classes, interfaces, methods and fields, and also all non-exported packages.\nBecause the module source hierarchy allows any number of Java modules in the same Maven sub-project,\nit is easy to add an `org.foo.bar.test` module which will test the `org.foo.bar` module as if it was\nan ordinary client application.\n\n\n## White Box testing\n\n\"White Box testing\" refers to tests which have an access to the internal classes of the project to test.\nFor any `<source>` element with the `test` scope, all Java code placed in the directory managed by that\nelement is automatically white box testing for the module declared in the `<module>` child element.\nAccess to package-private types and members is granted by placing the code in the same package as the code to test.\nAccess to non-exported modules is implicit, but only for the module where the tests belong.\n\n\n## Reusing test fixtures of another module\n\nThe Maven 3 way (`test-jar`) is still supported in Maven 4.\nHowever, when using module source hierarchy, it is easier to place test fixtures\nin the test code of any module which is required by all modules that need these fixtures.\nThe test fixtures can be in any package, not necessarily a package that exists in the main code.\nThen, the `module-info-patch.maven` file can export that package to the other modules.\nFor example if the test fixtures are placed in the `org.foo.bar.test` package of the `org.foo.bar` module:\n\n```java\npatch-module org.foo.bar {            // Put here the name of the module to patch.\n    add-modules TEST-MODULE-PATH;     // Recommended value in the majority of cases.\n    add-reads TEST-MODULE-PATH;\n\n    add-exports org.foo.bar.test      // The package that contains the test fixtures.\n             to SUBPROJECT-MODULES;   // The other modules which want to use those test fixtures.\n}\n```\n\n`SUBPROJECT-MODULES` is a Maven-specific keyword for exporting to all other Java modules\nin the Maven (sub)project being compiled. It can be replaced by an explicit list of modules.\nThat's all, no need to deploy or install a test JAR.\n"
  },
  {
    "path": "src/site/markdown/multirelease.md",
    "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\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# Multi Release\n\nWith [JEP-238](http://openjdk.java.net/jeps/238) the support of multirelease JARs was introduced.\nThis means that you can have Java version dependent classes inside one JAR.\nBased on the runtime, it will pick up the best matching version of a class.\nThe output files of a multi-release project are organized like below:\n\n```\n.\n├─ A.class\n├─ B.class\n├─ C.class\n├─ D.class\n└─ META-INF\n   ├─ MANIFEST.MF { Multi-Release: true }\n   └─ versions\n      ├─ 9\n      │  ├─ A.class\n      │  └─ B.class\n      └─ 10\n         ├─ A.class\n         └─ C.class\n```\n\nWith the `Multi-Release: true` flag in the `MANIFEST.MF` file,\nthe Java runtime will also look inside `META-INF/versions` for version specific classes,\notherwise only the base classes are used.\n\n\n## Challenges\n\nThe theory behind multi release JARs is quite simple, but in practice it can become quite complex.\nYou must ensure that all classes stay in sync;\nif you add a method to one class, don't forget to add it to the other classes as well.\nThe best is to test the JAR with all targeted Java versions.\nYou should think twice before turning your JAR into a multi release JAR,\nbecause such JARs can be hard to read, maintain and test.\nIn general applications don't need this, unless it is a widely distributed application and you don't control the targeted Java runtime.\nLibraries should make a decision based on: do I need this new Java feature? Can I make this Java version the new requirement?\n\nThere are a couple of important facts one should know when creating Multi Release JARs:\n\n* The Java compiler must be called for every different version.\n  With Maven 3, it requires either having multiple Maven Projects/Modules or adding extra compiler execution-blocks to the POM\n  (like [older projects with module-info](./examples/module-info.html)).\n* The `Multi-Release: true` attribute is only recognized when the classes are in a JAR.\n  In other words, you cannot test the classes put in `target/classes/META-INF/versions/${release}/` with Maven 3.\n\n\n## Maven 3\n\nMaven 3 proposed many different patterns for building multi-release project.\nOne pattern is to create a sub-project for each version.\nThe project needs to be build with the highest required version of the JDK,\nand a `--release` option is specified in each sub-project.\nIf desired, toolchains can be used for compiling and testing with the matching Java version.\nThis pattern is demonstrated in the [maven-jep238](https://github.com/hboutemy/maven-jep238) project example.\nThe downside it that a hierarchical structure is required even though the result is just 1 artifact.\n\nAnother pattern is to use the [Multi Release JAR Maven Plugin](https://github.com/metlos/multi-release-jar-maven-plugin).\nThis approach introduces a new packaging type and an extra plugin takes care of the multiple executions of the Maven Compiler Plugin,\nbut these are now handled by the `perReleaseConfiguration` of the `multi-release-jar-maven-plugin`.\nWhat's not covered is how to test every class.\n\nSee [Maven Compiler Plugin integration tests](https://github.com/apache/maven-compiler-plugin/tree/master/src/it/multirelease-patterns)\nfor examples of small projects using the following patterns:\n\n* Maven sub-projects\n* Multi projects\n* Single project (runtime)\n* Single project (toolchains)\n* Maven extension + plugin\n\n\n## Maven 4\n\nBuilding a multi-release project is much easier with version 4 of the Maven Compiler Plugin.\nThe source code for all versions are placed in different directories of the same Maven project.\nThese directories are declared together with the Java release like below:\n\n```xml\n<build>\n  [...]\n  <sources>\n    <source>\n      <directory>src/main/java</directory>\n      <targetVersion>17</targetVersion>\n    </source>\n    <source>\n      <directory>src/main/java_21</directory>\n      <targetVersion>21</targetVersion>\n    </source>\n    <source>\n      <scope>test</scope>\n      <directory>src/test/java</directory>\n      <targetVersion>21</targetVersion>     <!-- Can often be omitted for tests -->\n  </sources>\n  [...]\n</build>\n```\n\nThe Maven Compiler plugin will take care of invoking `javac` once for each target version in increasing version order,\nwith the `--release` option set to the given `<targetVersion>` value, and\nwith the classes of previous versions added to the class-path or module-path with most recent versions having precedence.\nThe compiled classes are written in the `target/classes` and `target/classes/META-INF/versions` directories.\n"
  },
  {
    "path": "src/site/markdown/sources.md",
    "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\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# Declaration of source directories in Maven 4\n\nBy default, Maven compiles all `*.java` files in the `src/main/java` directory as the main Java code\nand all `*.java` files in the `src/test/java` directory as the test Java code.\nThis is suitable for a project in a single Java module targeting a single Java release.\nThis page describes how to use different or additional directories in Maven 4.\n\nThe Maven 3 `<sourceDirectory>` and `<testSourceDirectory>` elements are deprecated\nand should be replaced by the new `<sources>` element introduced in Maven 4.\nThis new element allows multi-source, multi-release and multi-module projects,\nas shown in sub-sections of this page.\nInstead of:\n\n```xml\n<project>\n  <build>\n    <sourceDirectory>my-custom-dir/foo</sourceDirectory>\n    <testSourceDirectory>my-custom-dir/bar</testSourceDirectory>\n  </build>\n</project>\n```\n\nOne can write:\n\n```xml\n<project>\n  <build>\n    <sources>\n      <source>\n        <scope>main</scope>     <!-- Can be omited as it is the default -->\n        <directory>my-custom-dir/foo</directory>\n      </source>\n      <source>\n        <scope>test</scope>\n        <directory>my-custom-dir/bar</directory>\n      </source>\n    </sources>\n  <build>\n</project>\n```\n\nNote that the declaration of a `<sources>` element *replaces* the default values.\nIf a `<source>` element is defined for one of the `main` or `test` scopes, then a\n`<source>` element should generally be defined for the other scope\neven if the latter use the default directory.\nSee the example in next sub-section.\n\n\n## Declaration of many source directories\n\nExternal plugins such as `build-helper-maven-plugin` are no longer needed\nand should be replaced by the built-in `<sources>` elements as shown below.\nNote that the directories of the first and last `<source>` elements are omitted\nas their default values are `src/main/java` and `src/test/java` respectively.\n\n```xml\n<project>\n  <build>\n    <sources>\n      <source>\n        <scope>main</scope>\n        <!-- Default directory is src/main/java -->\n      </source>\n      <source>\n        <scope>main</scope>     <!-- Can be omited as it is the default -->\n        <directory>src/extension/java</directory>\n      </source>\n      <source>\n        <scope>test</scope>\n        <!-- Default directory is src/test/java -->\n      </source>\n    </sources>\n  <build>\n</project>\n```\n\n\n## Multi-release project\n\nThe compiler plugin automatically handles multiple executions of `javac` with different `--release` option values\ntogether with automatic adjustments of class-path, module-path and output directories for producing a multi-release project.\nExample:\n\n```xml\n<project>\n  <build>\n    <sources>\n      <source>\n        <targetVersion>17</targetVersion>\n        <!-- Default directory is src/main/java -->\n      </source>\n      <source>\n        <targetVersion>21</targetVersion>\n        <directory>src/main/java_21</directory>\n      </source>\n      <source>\n        <scope>test</scope>\n        <!-- Default directory is src/test/java -->\n      </source>\n    </sources>\n  </build>\n</project>\n```\n\n\n## Multi-module project\n\nMaven 4 supports the Java [module source hierarchy](https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#directory-hierarchies)\nwith the caveat that as of February 2026, not all plugins have been updated yet.\nCompared to multiple Maven sub-projects, using multiple Java modules in a single Maven sub-project has advantages such as\nresolving compiler warnings in references to dependent modules (the converse of references to dependencies),\neasier sharing of test code between modules in the Maven sub-project (no need for `test-jar`),\nand easier aggregated Javadoc for modules in the Maven sub-project.\nSee the [modular projects](./modules.html) page for more information.\nFor example, a Maven sub-project containing two Java modules named `org.foo.bar.module1` and `org.foo.bar.module2`\ncan be declared with the following fragment in the `pom.xml` file:\n\n```xml\n<build>\n  <sources>\n    <source>\n      <module>org.foo.bar.module1</module>\n      <!-- Default directory is src/org.foo.bar.module1/main/java -->\n    </source>\n    <source>\n      <module>org.foo.bar.module2</module>\n      <!-- Default directory is src/org.foo.bar.module2/main/java -->\n    </source>\n    <source>\n      <scope>test</scope>\n      <module>org.foo.bar.module1</module>\n      <!-- Default directory is src/org.foo.bar.module1/test/java -->\n    </source>\n    <source>\n      <scope>test</scope>\n      <module>org.foo.bar.module2</module>\n      <!-- Default directory is src/org.foo.bar.module2/test/java -->\n    </source>\n  </sources>\n</build>\n```\n\nThe default directory layout is then as below:\n\n```\nsrc\n├─ org.foo.bar.module1\n│  ├─ main\n│  │  ├─ java\n│  │  │  └─ org/foo/bar/**/*.java\n│  └─ test\n│     └─ java\n│        └─ org/foo/bar/**/*Test.java\n└─ org.foo.bar.module2\n   ├─ main\n   │  └─ java\n   │     └─ org/foo/bar/**/*.java\n   └─ test\n      └─ java\n         └─ org/foo/bar/**/*Test.java\n```\n\n\n### Current support\n\nAs of October 2025, only the Maven Compiler Plugin supports module source hierarchy.\nThe following plugins need to be updated:\n\n* Maven Surefire plugin\n* Maven JAR plugin\n* Maven Javadoc plugin\n\n\n## Include/exclude filters\n\nThe Maven 3 way to declare include/exclude filters is still supported,\nbut should be replaced by the `<sources>` element when applicable.\nThose two ways are not strictly equivalent:\n\n* The Maven 4 way specifies filters independently for each source directory.\n  These filters will be applied by all plugins that have migrated to the Maven 4 API, not only the compiler plugin.\n* Conversely, the Maven 3 way specifies filters which will be applied only by the compiler plugin.\n  However, these filters apply to all source directories.\n\nThe following (Maven 3) specifies a filter applied on all source directories but only by the compiler plugin:\n\n```xml\n<project>\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <excludes>\n            <exclude>**/Foo*.java</exclude>\n          </excludes>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n```\n\nThe following (Maven 4) specifies a filter applied only on the specified directories,\nbut potentially used (when relevant) by all plugins upgraded to Maven 4:\n\n```xml\n<project>\n  <build>\n    <sources>\n      <source>\n        <directory>src/main/java</directory>\n        <excludes>\n          <exclude>**/Foo*.java</exclude>\n        </excludes>\n      </source>\n      <source>\n        <scope>test</scope>\n        <directory>src/test/java</directory>\n      </source>\n    </sources>\n  </build>\n</project>\n```\n"
  },
  {
    "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<project xmlns=\"http://maven.apache.org/DECORATION/1.8.0\"\n  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n  xsi:schemaLocation=\"http://maven.apache.org/DECORATION/1.8.0 https://maven.apache.org/xsd/decoration-1.8.0.xsd\">\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=\"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=\"Configuration\">\n      <item name=\"Multi-source project\" href=\"sources.html\"/>\n      <item name=\"Multi-release project\" href=\"multirelease.html\"/>\n      <item name=\"Multi-module projects\" href=\"modules.html\"/>\n      <item name=\"Module-info patch for tests\" href=\"module-info-patch.html\"/>\n    </menu>\n    <menu name=\"Examples\">\n      <item name=\"Compile Using A Different JDK\" href=\"examples/compile-using-different-jdk.html\"/>\n      <item name=\"Compile Using the --release javac Option\" href=\"examples/set-compiler-release.html\"/>\n      <item name=\"Compile Using Memory Allocation Enhancements\" href=\"examples/compile-with-memory-enhancements.html\"/>\n      <item name=\"Pass Compiler Arguments\" href=\"examples/pass-compiler-arguments.html\"/>\n      <item name=\"Non-javac compilerIds\" href=\"examples/non-javac-compilers.html\"/>\n      <item name=\"Older projects with module-info\" href=\"examples/module-info.html\"/>\n      <item name=\"Perform annotation processing\" href=\"examples/annotation-processor.html\"/>\n    </menu>\n  </body>\n</project>\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/plugin/compiler/CompilerMojoTestCase.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.plugin.compiler;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.UncheckedIOException;\nimport java.net.URI;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.time.Instant;\nimport java.time.temporal.ChronoUnit;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\n\nimport org.apache.maven.api.PathScope;\nimport org.apache.maven.api.Project;\nimport org.apache.maven.api.Session;\nimport org.apache.maven.api.di.Inject;\nimport org.apache.maven.api.di.Provides;\nimport org.apache.maven.api.di.Singleton;\nimport org.apache.maven.api.model.Build;\nimport org.apache.maven.api.model.Model;\nimport org.apache.maven.api.plugin.Log;\nimport org.apache.maven.api.plugin.testing.Basedir;\nimport org.apache.maven.api.plugin.testing.InjectMojo;\nimport org.apache.maven.api.plugin.testing.MojoExtension;\nimport org.apache.maven.api.plugin.testing.MojoParameter;\nimport org.apache.maven.api.plugin.testing.MojoTest;\nimport org.apache.maven.api.plugin.testing.stubs.ProducedArtifactStub;\nimport org.apache.maven.api.plugin.testing.stubs.ProjectStub;\nimport org.apache.maven.api.plugin.testing.stubs.SessionMock;\nimport org.apache.maven.api.services.ArtifactManager;\nimport org.apache.maven.api.services.MessageBuilderFactory;\nimport org.apache.maven.api.services.ToolchainManager;\nimport org.apache.maven.impl.DefaultMessageBuilderFactory;\nimport org.apache.maven.impl.InternalSession;\nimport org.apache.maven.plugin.compiler.stubs.CompilerStub;\nimport org.junit.jupiter.api.Test;\n\nimport static org.junit.jupiter.api.Assertions.assertArrayEquals;\nimport static org.junit.jupiter.api.Assertions.assertEquals;\nimport static org.junit.jupiter.api.Assertions.assertFalse;\nimport static org.junit.jupiter.api.Assertions.assertNull;\nimport static org.junit.jupiter.api.Assertions.assertThrows;\nimport static org.junit.jupiter.api.Assertions.assertTrue;\nimport static org.junit.jupiter.api.Assertions.fail;\nimport static org.mockito.ArgumentMatchers.any;\nimport static org.mockito.ArgumentMatchers.eq;\nimport static org.mockito.ArgumentMatchers.startsWith;\nimport static org.mockito.Mockito.doAnswer;\nimport static org.mockito.Mockito.doReturn;\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.never;\nimport static org.mockito.Mockito.verify;\n\n@MojoTest\npublic class CompilerMojoTestCase {\n\n    private static final String LOCAL_REPO = \"/target/local-repo\";\n\n    @Inject\n    private Session session;\n\n    /**\n     * Verifies that the {@value CompilerStub#OUTPUT_FILE} file exists, then deletes it.\n     * The deletion is necessary for preventing an {@link IndexOutOfBoundsException} in\n     * {@code maven-dependency-plugin} version 3.8.1, because the output file is empty.\n     *\n     * @param mojo the tested mojo\n     */\n    private static void assertCompilerStubOutputFileExists(AbstractCompilerMojo mojo) {\n        try {\n            Files.delete(assertOutputFileExists(mojo, CompilerStub.OUTPUT_FILE));\n        } catch (IOException e) {\n            throw new UncheckedIOException(e);\n        }\n    }\n\n    /**\n     * Verifies that the given output file exists.\n     *\n     * @param mojo the tested mojo\n     * @param first the first path element\n     * @param more the other path elements, if any\n     * @return the file\n     */\n    private static Path assertOutputFileExists(AbstractCompilerMojo mojo, String first, String... more) {\n        Path file = mojo.getOutputDirectory().resolve(Path.of(first, more));\n        assertTrue(Files.isRegularFile(file), () -> \"File not found: \" + file);\n        return file;\n    }\n\n    /**\n     * Verifies that the given output file does not exist.\n     *\n     * @param mojo the tested mojo\n     * @param first the first path element\n     * @param more the other path elements, if any\n     */\n    private static void assertOutputFileDoesNotExist(AbstractCompilerMojo mojo, String first, String... more) {\n        Path file = mojo.getOutputDirectory().resolve(Path.of(first, more));\n        assertFalse(Files.exists(file), () -> \"File should not exist: \" + file);\n    }\n\n    /**\n     * Tests the ability of the plugin to compile a basic file.\n     * This test does not declare a Java release version. Therefore, a warning should be emitted.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-basic-test\")\n    public void testCompilerBasic(\n            @InjectMojo(goal = \"compile\", pom = \"plugin-config.xml\") CompilerMojo compileMojo,\n            @InjectMojo(goal = \"testCompile\", pom = \"plugin-config.xml\")\n                    @MojoParameter(name = \"compileSourceRoots\", value = \"${project.basedir}/src/test/java\")\n                    TestCompilerMojo testCompileMojo) {\n\n        Log log = mock(Log.class);\n        compileMojo.logger = log;\n        compileMojo.execute();\n        verify(log).warn(startsWith(\"No explicit value set for --release or --target.\"));\n        assertOutputFileExists(compileMojo, \"foo\", \"TestCompile0.class\");\n        assertTrue(\n                session.getArtifactPath(compileMojo.projectArtifact).isPresent(),\n                \"MCOMPILER-94: artifact file should only be null if there is nothing to compile\");\n\n        testCompileMojo.execute();\n        assertOutputFileExists(testCompileMojo, \"foo\", \"TestCompile0Test.class\");\n        assertOutputFileDoesNotExist(compileMojo, \"foo\", \"TestCompile0Test.class\");\n    }\n\n    /**\n     * A project with a source and target version specified.\n     * No warning should be logged.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-basic-sourcetarget\")\n    public void testCompilerBasicSourceTarget(\n            @InjectMojo(goal = \"compile\", pom = \"plugin-config.xml\") CompilerMojo compileMojo) {\n\n        Log log = mock(Log.class);\n        compileMojo.logger = log;\n        compileMojo.execute();\n        verify(log, never()).warn(startsWith(\"No explicit value set for --release or --target.\"));\n    }\n\n    /**\n     * Tests the ability of the plugin to respond to empty source.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-empty-source-test\")\n    public void testCompilerEmptySource(\n            @InjectMojo(goal = \"compile\", pom = \"plugin-config.xml\") CompilerMojo compileMojo,\n            @InjectMojo(goal = \"testCompile\", pom = \"plugin-config.xml\")\n                    @MojoParameter(name = \"compileSourceRoots\", value = \"${basedir}/src/test/java\")\n                    TestCompilerMojo testCompileMojo) {\n\n        compileMojo.execute();\n        assertFalse(Files.exists(compileMojo.getOutputDirectory()));\n        assertNull(\n                session.getArtifactPath(compileMojo.projectArtifact).orElse(null),\n                \"MCOMPILER-94: artifact file should be null if there is nothing to compile\");\n\n        testCompileMojo.execute();\n        assertFalse(Files.exists(testCompileMojo.getOutputDirectory()));\n    }\n\n    /**\n     * Tests the ability of the plugin to respond to includes and excludes correctly.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-includes-excludes-test\")\n    public void testCompilerIncludesExcludes(\n            @InjectMojo(goal = \"compile\", pom = \"plugin-config.xml\") CompilerMojo compileMojo,\n            @InjectMojo(goal = \"testCompile\", pom = \"plugin-config.xml\")\n                    @MojoParameter(name = \"compileSourceRoots\", value = \"${project.basedir}/src/test/java\")\n                    TestCompilerMojo testCompileMojo) {\n\n        compileMojo.execute();\n        assertOutputFileDoesNotExist(compileMojo, \"foo\", \"TestCompile2.class\");\n        assertOutputFileDoesNotExist(compileMojo, \"foo\", \"TestCompile3.class\");\n        assertOutputFileExists(compileMojo, \"foo\", \"TestCompile4.class\");\n\n        testCompileMojo.execute();\n        assertOutputFileDoesNotExist(testCompileMojo, \"foo\", \"TestCompile2TestCase.class\");\n        assertOutputFileDoesNotExist(testCompileMojo, \"foo\", \"TestCompile3TestCase.class\");\n        assertOutputFileExists(testCompileMojo, \"foo\", \"TestCompile4TestCase.class\");\n        assertOutputFileDoesNotExist(compileMojo, \"foo\", \"TestCompile4TestCase.class\");\n    }\n\n    /**\n     * Tests the ability of the plugin to fork and successfully compile.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-fork-test\")\n    public void testCompilerFork(\n            @InjectMojo(goal = \"compile\", pom = \"plugin-config.xml\") CompilerMojo compileMojo,\n            @InjectMojo(goal = \"testCompile\", pom = \"plugin-config.xml\")\n                    @MojoParameter(name = \"compileSourceRoots\", value = \"${project.basedir}/src/test/java\")\n                    TestCompilerMojo testCompileMojo) {\n\n        // JAVA_HOME doesn't have to be on the PATH.\n        String javaHome = System.getenv(\"JAVA_HOME\");\n        if (javaHome != null) {\n            String command = new File(javaHome, \"bin/javac\").getPath();\n            compileMojo.executable = command;\n            testCompileMojo.executable = command;\n        }\n        compileMojo.execute();\n        assertOutputFileExists(compileMojo, \"foo\", \"TestCompile1.class\");\n\n        testCompileMojo.execute();\n        assertOutputFileExists(testCompileMojo, \"foo\", \"TestCompile1TestCase.class\");\n        assertOutputFileDoesNotExist(compileMojo, \"foo\", \"TestCompile1TestCase.class\");\n    }\n\n    /**\n     * Tests the use of a custom compiler.\n     * The dummy compiler used in this test generates only one file, despite having more than one source.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-one-output-file-test\")\n    public void testOneOutputFileForAllInput(\n            @InjectMojo(goal = \"compile\", pom = \"plugin-config.xml\") CompilerMojo compileMojo,\n            @InjectMojo(goal = \"testCompile\", pom = \"plugin-config.xml\")\n                    @MojoParameter(name = \"compileSourceRoots\", value = \"${project.basedir}/src/test/java\")\n                    TestCompilerMojo testCompileMojo) {\n\n        assertEquals(CompilerStub.COMPILER_ID, compileMojo.compilerId);\n        compileMojo.execute();\n        assertCompilerStubOutputFileExists(compileMojo);\n\n        assertEquals(CompilerStub.COMPILER_ID, testCompileMojo.compilerId);\n        testCompileMojo.execute();\n        assertCompilerStubOutputFileExists(testCompileMojo);\n    }\n\n    /**\n     * Verifies that the options in the {@code <compilerArgs>} elements are given to the compiler.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-args-test\")\n    public void testCompilerArgs(@InjectMojo(goal = \"compile\", pom = \"plugin-config.xml\") CompilerMojo compileMojo) {\n\n        assertEquals(CompilerStub.COMPILER_ID, compileMojo.compilerId);\n        compileMojo.execute();\n\n        assertCompilerStubOutputFileExists(compileMojo);\n        assertArrayEquals(\n                new String[] {\"key1=value1\", \"-Xlint\", \"-my&special:param-with+chars/not>allowed_in_XML_element_names\"},\n                compileMojo.compilerArgs.toArray(String[]::new));\n\n        List<String> options = CompilerStub.getOptions();\n        assertArrayEquals(\n                new String[] {\n                    \"--module-version\", // Added by the plugin\n                    \"1.0-SNAPSHOT\",\n                    \"key1=value1\", // Specified in <compilerArgs>\n                    \"-Xlint\",\n                    \"-my&special:param-with+chars/not>allowed_in_XML_element_names\",\n                    \"param\", // Specified in <compilerArgument>\n                    \"value\"\n                },\n                options.toArray(String[]::new));\n    }\n\n    /**\n     * Tests the {@code <implicit>} option when set to \"none\".\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-implicit-test\")\n    public void testImplicitFlagNone(\n            @InjectMojo(goal = \"compile\", pom = \"plugin-config-none.xml\") CompilerMojo compileMojo) {\n\n        assertEquals(\"none\", compileMojo.implicit);\n        compileMojo.execute();\n    }\n\n    /**\n     * Tests the {@code <implicit>} option when not set.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-implicit-test\")\n    public void testImplicitFlagNotSet(\n            @InjectMojo(goal = \"compile\", pom = \"plugin-config-not-set.xml\") CompilerMojo compileMojo) {\n\n        assertNull(compileMojo.implicit);\n        compileMojo.execute();\n    }\n\n    /**\n     * Tests the compilation of a project having a {@code module-info.java} file, together with its tests.\n     * The compilation of tests requires a {@code --patch-module} option, otherwise compilation will fail.\n     *\n     * <h4>Requirements on Windows</h4>\n     * Executing the tests on Windows requires the developer mode.\n     * This is enabled with {@literal Settings > Update & Security > For Developers}.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-modular-project\")\n    public void testModularProject(\n            @InjectMojo(goal = \"compile\", pom = \"plugin-config.xml\") CompilerMojo compileMojo,\n            @InjectMojo(goal = \"testCompile\", pom = \"plugin-config.xml\")\n                    @MojoParameter(name = \"compileSourceRoots\", value = \"${project.basedir}/src/test/java\")\n                    TestCompilerMojo testCompileMojo) {\n\n        compileMojo.execute();\n        assertOutputFileExists(compileMojo, SourceDirectory.MODULE_INFO + SourceDirectory.CLASS_FILE_SUFFIX);\n        assertOutputFileExists(compileMojo, \"foo\", \"TestModular.class\");\n\n        testCompileMojo.execute();\n        assertOutputFileExists(testCompileMojo, \"foo\", \"TestModularTestCase.class\");\n        assertOutputFileDoesNotExist(compileMojo, \"foo\", \"TestModularTestCase.class\");\n    }\n\n    /**\n     * Tests a compilation task which is expected to fail.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-fail-test\")\n    public void testCompileFailure(@InjectMojo(goal = \"compile\", pom = \"plugin-config.xml\") CompilerMojo compileMojo) {\n        assertThrows(CompilationFailureException.class, compileMojo::execute, \"Should throw an exception\");\n        assertOutputFileExists(compileMojo, \"..\", \"javac.args\"); // Command-line that user can execute.\n    }\n\n    /**\n     * Tests a compilation task which is expected to fail, but where test failure are ignored.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-failonerror-test\")\n    public void testCompileFailOnError(\n            @InjectMojo(goal = \"compile\", pom = \"plugin-config.xml\") CompilerMojo compileMojo) {\n\n        try {\n            compileMojo.execute();\n        } catch (CompilationFailureException e) {\n            fail(\"The compilation error should have been consumed because failOnError = false\");\n        }\n        assertOutputFileExists(compileMojo, \"..\", \"javac.args\"); // Command-line that user can execute.\n    }\n\n    /**\n     * Tests that setting {@code skipMain} to true skips compilation of the main Java source files,\n     * but that test Java source files are still compiled.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-skip-main\")\n    public void testCompileSkipMain(\n            @InjectMojo(goal = \"compile\", pom = \"plugin-config.xml\") CompilerMojo compileMojo,\n            @InjectMojo(goal = \"testCompile\", pom = \"plugin-config.xml\")\n                    @MojoParameter(name = \"compileSourceRoots\", value = \"${project.basedir}/src/test/java\")\n                    TestCompilerMojo testCompileMojo) {\n\n        compileMojo.skipMain = true;\n        compileMojo.execute();\n        assertOutputFileDoesNotExist(compileMojo, \"foo\", \"TestSkipMainCompile0.class\");\n\n        testCompileMojo.execute();\n        assertOutputFileExists(testCompileMojo, \"foo\", \"TestSkipMainCompile0Test.class\");\n        assertOutputFileDoesNotExist(compileMojo, \"foo\", \"TestSkipMainCompile0Test.class\");\n    }\n\n    /**\n     * Tests that setting {@code skip} to true skips compilation of the test Java source files,\n     * but that main Java source files are still compiled.\n     */\n    @Test\n    @Basedir(\"${basedir}/target/test-classes/unit/compiler-skip-test\")\n    public void testCompileSkipTest(\n            @InjectMojo(goal = \"compile\", pom = \"plugin-config.xml\") CompilerMojo compileMojo,\n            @InjectMojo(goal = \"testCompile\", pom = \"plugin-config.xml\")\n                    @MojoParameter(name = \"compileSourceRoots\", value = \"${project.basedir}/src/test/java\")\n                    TestCompilerMojo testCompileMojo) {\n\n        compileMojo.execute();\n        assertOutputFileExists(compileMojo, \"foo/TestSkipTestCompile0.class\");\n\n        testCompileMojo.skip = true;\n        testCompileMojo.execute();\n        assertOutputFileDoesNotExist(testCompileMojo, \"foo\", \"TestSkipTestCompile0Test.class\");\n        assertOutputFileDoesNotExist(compileMojo, \"foo\", \"TestSkipTestCompile0Test.class\");\n    }\n\n    @Provides\n    @Singleton\n    @SuppressWarnings(\"unused\")\n    private static InternalSession createSession() {\n        InternalSession session = SessionMock.getMockSession(MojoExtension.getBasedir() + LOCAL_REPO);\n\n        ToolchainManager toolchainManager = mock(ToolchainManager.class);\n        doReturn(toolchainManager).when(session).getService(ToolchainManager.class);\n\n        doAnswer(iom -> Instant.now().minus(200, ChronoUnit.MILLIS))\n                .when(session)\n                .getStartTime();\n\n        var junit = new ProducedArtifactStub(\"junit\", \"junit\", null, \"3.8.1\", \"jar\");\n\n        MessageBuilderFactory messageBuilderFactory = new DefaultMessageBuilderFactory();\n        doReturn(messageBuilderFactory).when(session).getService(MessageBuilderFactory.class);\n\n        Map<String, String> props = new HashMap<>();\n        props.put(\"basedir\", MojoExtension.getBasedir());\n        doReturn(props).when(session).getUserProperties();\n\n        List<Path> artifacts = new ArrayList<>();\n        try {\n            Path artifactFile;\n            String localRepository = System.getProperty(\"localRepository\");\n            if (localRepository != null) {\n                artifactFile = Path.of(\n                        localRepository,\n                        \"org\",\n                        \"junit\",\n                        \"jupiter\",\n                        \"junit-jupiter-api\",\n                        \"5.10.2\",\n                        \"junit-jupiter-api-5.10.2.jar\");\n            } else {\n                // for IDE\n                String junitURI = Test.class.getResource(\"Test.class\").toURI().toString();\n                junitURI = junitURI.substring(\"jar:\".length(), junitURI.indexOf('!'));\n                artifactFile = new File(URI.create(junitURI)).toPath();\n            }\n            ArtifactManager artifactManager = session.getService(ArtifactManager.class);\n            artifactManager.setPath(junit, artifactFile);\n            artifacts.add(artifactFile);\n        } catch (Exception e) {\n            throw new RuntimeException(\"Unable to setup junit jar path\", e);\n        }\n\n        doAnswer(iom -> List.of()).when(session).resolveDependencies(any(), eq(PathScope.MAIN_COMPILE));\n        doAnswer(iom -> artifacts).when(session).resolveDependencies(any(), eq(PathScope.TEST_COMPILE));\n\n        return session;\n    }\n\n    @Provides\n    @Singleton\n    @SuppressWarnings(\"unused\")\n    private static Project createProject() {\n        ProjectStub stub = new ProjectStub();\n        var artifact = new ProducedArtifactStub(\"myGroupId\", \"myArtifactId\", null, \"1.0-SNAPSHOT\", \"jar\");\n        stub.setMainArtifact(artifact);\n        stub.setModel(Model.newBuilder()\n                .groupId(artifact.getGroupId())\n                .artifactId(artifact.getArtifactId())\n                .version(artifact.getVersion().toString())\n                .build(Build.newBuilder()\n                        .directory(MojoExtension.getBasedir() + \"/target\")\n                        .outputDirectory(MojoExtension.getBasedir() + \"/target/classes\")\n                        .sourceDirectory(MojoExtension.getBasedir() + \"/src/main/java\")\n                        .testOutputDirectory(MojoExtension.getBasedir() + \"/target/test-classes\")\n                        .build())\n                .build());\n        stub.setBasedir(Path.of(MojoExtension.getBasedir()));\n        return stub;\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugin/compiler/ModuleInfoPatchTest.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.plugin.compiler;\n\nimport javax.tools.OptionChecker;\n\nimport java.io.BufferedWriter;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.Reader;\nimport java.io.StringWriter;\n\nimport org.apache.maven.api.plugin.Log;\nimport org.junit.jupiter.api.Test;\nimport org.mockito.Mockito;\n\nimport static org.junit.jupiter.api.Assertions.assertArrayEquals;\n\n/**\n * Tests {@link ModuleInfoPatch}.\n *\n * @author Martin Desruisseaux\n */\npublic class ModuleInfoPatchTest implements OptionChecker {\n    /**\n     * Test reading a file.\n     *\n     * @throws IOException if an I/O error occurred while loading the file\n     */\n    @Test\n    public void testRead() throws IOException {\n        var info = new ModuleInfoPatch(null, null);\n        try (Reader r =\n                new InputStreamReader(ModuleInfoPatchTest.class.getResourceAsStream(\"module-info-patch.maven\"))) {\n            info.load(r);\n        }\n        var config = new Options(this, Mockito.mock(Log.class));\n        var out = new StringWriter();\n        try (var buffered = new BufferedWriter(out)) {\n            info.writeTo(config, buffered);\n        }\n        assertArrayEquals(\n                new String[] {\n                    \"--add-modules\",\n                    \"ALL-MODULE-PATH\",\n                    \"--limit-modules\",\n                    \"org.junit.jupiter.api\",\n                    \"--add-reads\",\n                    \"org.mymodule=org.junit.jupiter.api\",\n                    \"--add-exports\",\n                    \"org.mymodule/org.mypackage=org.someone,org.another\",\n                    \"--add-exports\",\n                    \"org.mymodule/org.foo=TEST-MODULE-PATH\"\n                },\n                config.options.toArray());\n\n        assertArrayEquals(\n                new String[] {\n                    \"--add-modules ALL-MODULE-PATH\",\n                    \"--limit-modules org.junit.jupiter.api\",\n                    \"--add-reads org.mymodule=org.junit.jupiter.api\",\n                    \"--add-exports org.mymodule/org.mypackage=org.someone,org.another\",\n                    \"--add-exports org.mymodule/org.foo=TEST-MODULE-PATH\",\n                    \"--add-opens org.mymodule/org.foo=org.junit.jupiter.api\"\n                },\n                out.toString().split(System.lineSeparator()));\n    }\n\n    /**\n     * {@return the number of arguments the given option takes}\n     *\n     * @param option an option\n     */\n    @Override\n    public int isSupportedOption(String option) {\n        return 1;\n    }\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugin/compiler/stubs/CompilerStub.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.plugin.compiler.stubs;\n\nimport javax.annotation.processing.Processor;\nimport javax.lang.model.SourceVersion;\nimport javax.tools.DiagnosticListener;\nimport javax.tools.FileObject;\nimport javax.tools.JavaCompiler;\nimport javax.tools.JavaFileManager;\nimport javax.tools.JavaFileObject;\nimport javax.tools.SimpleJavaFileObject;\nimport javax.tools.StandardJavaFileManager;\nimport javax.tools.StandardLocation;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.UncheckedIOException;\nimport java.io.Writer;\nimport java.nio.charset.Charset;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Locale;\nimport java.util.Set;\n\n/**\n * A dummy implementation of the {@code JavaCompiler} interface for testing the Maven compiler plugin\n * with alternative compilers. This dummy compiler actually ignores all source files and always writes\n * exactly one output file, namely {@value #OUTPUT_FILE}.\n *\n * <h2>Instantiation</h2>\n * This stub is not instantiated directly. Instead, the fully-qualified class name must be declared\n * in the {@code META-INF/services/javax.tools.Tool} file. Then, an instance is requested by setting\n * the {@code <compilerId>} element to {@value #COMPILER_ID} in the {@code plugin-config.xml} file\n * of the test.\n *\n * @author Edwin Punzalan\n * @author Martin Desruisseaux\n */\npublic class CompilerStub implements JavaCompiler, StandardJavaFileManager {\n    /**\n     * The name returned by {@link #name()}. Used for identifying this stub.\n     * This is the value to specify in the {@code <compilerId>} element of the POM test file.\n     *\n     * @see #name()\n     */\n    public static final String COMPILER_ID = \"maven-compiler-stub\";\n\n    /**\n     * Name of the dummy file created as output by this compiler stub.\n     *\n     * @see #inferBinaryName(JavaFileManager.Location, JavaFileObject)\n     */\n    public static final String OUTPUT_FILE = \"compiled.class\";\n\n    /**\n     * The output directory, or {@code null} if not yet set.\n     *\n     * @see #setLocation(JavaFileManager.Location, Iterable)\n     */\n    private File outputDir;\n\n    /**\n     * Options given to the compiler when executed.\n     *\n     * @see #getOptions()\n     */\n    private static final ThreadLocal<Iterable<String>> ARGUMENTS = new ThreadLocal<>();\n\n    /**\n     * Invoked by reflection by {@link java.util.ServiceLoader}.\n     */\n    public CompilerStub() {}\n\n    /**\n     * {@return the compiler idenitifer of this stub}\n     */\n    @Override\n    public String name() {\n        return COMPILER_ID;\n    }\n\n    /**\n     * {@return an arbitrary Java release number}\n     * This is not used by the tests.\n     */\n    @Override\n    public Set<SourceVersion> getSourceVersions() {\n        return Set.of(SourceVersion.RELEASE_17);\n    }\n\n    /**\n     * {@return the number of arguments expected by the given option}\n     * This method is implemented by a hard-coded list of options that\n     * are known to be used in some tests.\n     */\n    @Override\n    public int isSupportedOption(String option) {\n        if (option.startsWith(\"-my&\")) {\n            return 0;\n        }\n        switch (option) {\n            case \"-Xlint\":\n                return 0;\n            default:\n                return 1;\n        }\n    }\n\n    /**\n     * {@return the object where source and destination directories will be specified by the Maven compiler plugin}\n     */\n    @Override\n    public StandardJavaFileManager getStandardFileManager(\n            DiagnosticListener<? super JavaFileObject> diagnosticListener, Locale locale, Charset charset) {\n        return this;\n    }\n\n    /**\n     * {@return whether the two given objects are for the same file}\n     * This method is not seriously implemented, as it is not needed for the tests.\n     */\n    @Override\n    public boolean isSameFile(FileObject a, FileObject b) {\n        return a.equals(b);\n    }\n\n    /**\n     * Source or target directory, or source file to compile.\n     * For this test, we do not bother to identify the exact purpose of the wrapped file.\n     */\n    private static final class UnknownFile extends SimpleJavaFileObject {\n        UnknownFile(final File file) {\n            super(file.toURI(), JavaFileObject.Kind.OTHER);\n        }\n\n        UnknownFile(final String name) {\n            this(new File(name));\n        }\n    }\n\n    /**\n     * {@return the given files or directories wrapped in a dummy implementation of {@code FileObject}}\n     */\n    @Override\n    public Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files) {\n        var objects = new ArrayList<JavaFileObject>();\n        files.forEach(UnknownFile::new);\n        return objects;\n    }\n\n    /**\n     * {@return the given files or directories wrapped in a dummy implementation of {@code FileObject}}\n     */\n    @Override\n    public Iterable<? extends JavaFileObject> getJavaFileObjects(File... files) {\n        return getJavaFileObjectsFromFiles(Arrays.asList(files));\n    }\n\n    /**\n     * {@return the given files or directories wrapped in a dummy implementation of {@code FileObject}}\n     */\n    @Override\n    public Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names) {\n        var objects = new ArrayList<JavaFileObject>();\n        names.forEach(UnknownFile::new);\n        return objects;\n    }\n\n    /**\n     * {@return the given files or directories wrapped in a dummy implementation of {@code FileObject}}\n     */\n    @Override\n    public Iterable<? extends JavaFileObject> getJavaFileObjects(String... names) {\n        return getJavaFileObjectsFromStrings(Arrays.asList(names));\n    }\n\n    /**\n     * {@return whether the given location is known to this file manager}\n     */\n    @Override\n    public boolean hasLocation(Location location) {\n        return location == StandardLocation.CLASS_OUTPUT;\n    }\n\n    /**\n     * Sets a directory for the given type of location. This simple stubs accepts a single\n     * directory for {@link StandardLocation#CLASS_OUTPUT} and ignores all other locations.\n     */\n    @Override\n    public void setLocation(Location location, Iterable<? extends File> files) {\n        if (location == StandardLocation.CLASS_OUTPUT) {\n            outputDir = null;\n            Iterator<? extends File> it = files.iterator();\n            if (it.hasNext()) {\n                outputDir = it.next();\n                if (it.hasNext()) {\n                    throw new IllegalArgumentException(\"This simple stub accepts a maximum of one output directory.\");\n                }\n            }\n        }\n    }\n\n    /**\n     * {@return the directory for the given type of location}\n     */\n    @Override\n    public Iterable<? extends File> getLocation(Location location) {\n        if (location == StandardLocation.CLASS_OUTPUT && outputDir != null) {\n            return Set.of(outputDir);\n        }\n        return Set.of();\n    }\n\n    /**\n     * Not used by the tests.\n     */\n    @Override\n    public ClassLoader getClassLoader(Location location) {\n        return Thread.currentThread().getContextClassLoader();\n    }\n\n    /**\n     * Not used by the tests.\n     */\n    @Override\n    public Iterable<JavaFileObject> list(\n            Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) {\n        return Set.of();\n    }\n\n    /**\n     * {@returns the name of the single file created by this dummy compiler}.\n     */\n    @Override\n    public String inferBinaryName(Location location, JavaFileObject file) {\n        return OUTPUT_FILE;\n    }\n\n    /**\n     * Not used by the tests.\n     */\n    @Override\n    public boolean handleOption(String current, Iterator<String> remaining) {\n        return false;\n    }\n\n    /**\n     * Not used by the tests.\n     */\n    @Override\n    public JavaFileObject getJavaFileForInput(Location location, String className, JavaFileObject.Kind kind) {\n        return null;\n    }\n\n    /**\n     * Not used by the tests.\n     */\n    @Override\n    public JavaFileObject getJavaFileForOutput(\n            Location location, String className, JavaFileObject.Kind kind, FileObject sibling) {\n        return null;\n    }\n\n    /**\n     * Not used by the tests.\n     */\n    @Override\n    public FileObject getFileForInput(Location location, String packageName, String relativeName) {\n        return null;\n    }\n\n    /**\n     * Not used by the tests.\n     */\n    @Override\n    public FileObject getFileForOutput(Location location, String packageName, String relativeName, FileObject sibling) {\n        return null;\n    }\n\n    /**\n     * {@return a compilation task}\n     */\n    @Override\n    public CompilationTask getTask(\n            Writer out,\n            JavaFileManager fileManager,\n            DiagnosticListener<? super JavaFileObject> diagnosticListener,\n            Iterable<String> options,\n            Iterable<String> classes,\n            Iterable<? extends JavaFileObject> compilationUnits) {\n\n        ARGUMENTS.set(options);\n        return new CompilationTask() {\n            @Override\n            public void addModules(Iterable<String> moduleNames) {}\n\n            @Override\n            public void setProcessors(Iterable<? extends Processor> processors) {}\n\n            @Override\n            public void setLocale(Locale locale) {}\n\n            /**\n             * Executes the pseudo-compilation.\n             *\n             * @return true for success, false otherwise\n             */\n            @Override\n            public Boolean call() {\n                return run(null, null, null, (String[]) null) == 0;\n            }\n        };\n    }\n\n    /**\n     * Executes the pseudo-compilation.\n     *\n     * @return 0 for success, nonzero otherwise\n     */\n    @Override\n    public int run(InputStream in, OutputStream out, OutputStream err, String... arguments) {\n        try {\n            outputDir.mkdirs();\n            File outputFile = new File(outputDir, OUTPUT_FILE);\n            outputFile.createNewFile();\n        } catch (IOException e) {\n            throw new UncheckedIOException(\"An exception occurred while creating output file.\", e);\n        }\n        return 0;\n    }\n\n    /**\n     * {@return the options given to the compiler when the compilation tasks was created}\n     */\n    public static List<String> getOptions() {\n        var options = new ArrayList<String>();\n        Iterable<String> args = ARGUMENTS.get();\n        if (args != null) {\n            args.forEach(options::add);\n        }\n        return options;\n    }\n\n    /**\n     * Nothing to do.\n     */\n    @Override\n    public void flush() {}\n\n    /**\n     * Nothing to do.\n     */\n    @Override\n    public void close() {}\n}\n"
  },
  {
    "path": "src/test/java/org/apache/maven/plugin/compiler/stubs/FailingCompilerStub.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.plugin.compiler.stubs;\n\nimport java.io.InputStream;\nimport java.io.OutputStream;\n\n/**\n * A dummy implementation of the {@code JavaCompiler} interface with intentional failure.\n *\n * <h2>Instantiation</h2>\n * This stub is not instantiated directly. Instead, the fully-qualified class name must be declared\n * in the {@code META-INF/services/javax.tools.Tool} file. Then, an instance is requested by setting\n * the {@code <compilerId>} element to {@value #FAILING_COMPILER_ID} in the {@code plugin-config.xml}\n * file of the test.\n */\npublic class FailingCompilerStub extends CompilerStub {\n    /**\n     * The name returned by {@link #name()}. Used for identifying this stub.\n     * This is the value to specify in the {@code <compilerId>} element of the POM test file.\n     *\n     * @see #name()\n     */\n    public static final String FAILING_COMPILER_ID = \"maven-failing-compiler-stub\";\n\n    /**\n     * Invoked by reflection by {@link java.util.ServiceLoader}.\n     */\n    public FailingCompilerStub() {}\n\n    /**\n     * {@return the compiler idenitifer of this stub}\n     */\n    @Override\n    public String name() {\n        return FAILING_COMPILER_ID;\n    }\n\n    /**\n     * Executes the pseudo-compilation.\n     *\n     * @return 1 for error\n     */\n    @Override\n    public int run(InputStream in, OutputStream out, OutputStream err, String... arguments) {\n        return 1;\n    }\n}\n"
  },
  {
    "path": "src/test/resources/META-INF/services/javax.tools.JavaCompiler",
    "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\norg.apache.maven.plugin.compiler.stubs.CompilerStub\norg.apache.maven.plugin.compiler.stubs.FailingCompilerStub\n"
  },
  {
    "path": "src/test/resources/org/apache/maven/plugin/compiler/module-info-patch.maven",
    "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 * Syntax: all keywords inside `patch-module` are Java compiler or Java launcher options without\n * the leading `--` characters. Each option value ends at the `;` character, which is mandatory.\n *\n * Some options expect a value of the form `module/package=other-module(,other-module)*`.\n * For these options, the `module` part will be the name immediately after `patch-module`\n * and shall not be repeated inside the block. The `=` sign is replaced by the `to` keyword,\n * as in `module-info.java` files.\n *\n * This block accepts only options that do not require a path to source or binary files.\n * Options with path values should be handled as Maven dependencies or sources instead.\n */\npatch-module org.mymodule {\n\n    add-modules ALL-MODULE-PATH;  // For testing purpose, but a valid value would rather be TEST-MODULE-PATH.\n\n    limit-modules org.junit.jupiter.api;\n\n    // Similar to `requires` in module-info.\n    // Accept also TEST-MODULE-PATH (Maven-specific).\n    add-reads org.junit.jupiter.api;\n\n    // Similar to `exports` in module-info.\n    add-exports org.mypackage\n             to org.someone,\n                org.another;\n\n    add-exports org.foo\n             to TEST-MODULE-PATH;   // Maven specific. Note: a standard alternative is ALL-UNNAMED.\n\n    // Not used by the compiler, but useful for test executions.\n    add-opens org.foo\n           to org.junit.jupiter.api;\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-args-test/plugin-config.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <!--\n            Incremental compilation must be disabled, otherwise arguments\n            are not given to the compiler if there is nothing to compile.\n          -->\n          <incrementalCompilation>none</incrementalCompilation>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <compilerId>maven-compiler-stub</compilerId>\n          <compilerArgs>\n              <arg>key1=value1</arg>\n              <arg>-Xlint</arg>\n              <arg><![CDATA[-my&special:param-with+chars/not>allowed_in_XML_element_names]]></arg>\n          </compilerArgs>\n          <compilerArgument>param value</compilerArgument>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-args-test/src/main/java/TestCompile0.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 foo;\n\npublic class TestCompile0 {\n\n    public TestCompile0() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-args-test/src/test/java/TestCompile0Test.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 foo;\n\npublic class TestCompile0Test {\n    public void testCompile0Test() {\n        TestCompile0 test = new TestCompile0();\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-basic-sourcetarget/plugin-config.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <source>17</source>\n          <target>17</target>\n          <incrementalCompilation>none</incrementalCompilation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-basic-sourcetarget/src/main/java/TestCompile0.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 foo;\n\npublic class TestCompile0 {\n\n    public TestCompile0() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-basic-test/plugin-config.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <incrementalCompilation>none</incrementalCompilation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-basic-test/src/main/java/foo/TestCompile0.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 foo;\n\npublic class TestCompile0 {\n\n    public TestCompile0() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-basic-test/src/test/java/foo/TestCompile0Test.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 foo;\n\npublic class TestCompile0Test {\n    public void testCompile0Test() {\n        TestCompile0 test = new TestCompile0();\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-empty-source-test/plugin-config.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <release>17</release>\n          <incrementalCompilation>none</incrementalCompilation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-fail-test/plugin-config.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <compilerId>maven-failing-compiler-stub</compilerId>\n          <incrementalCompilation>none</incrementalCompilation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-fail-test/src/main/java/TestCompile0.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 foo;\n\npublic class TestCompile0 {\n\n    public TestCompile0() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-fail-test/src/test/java/TestCompile0Test.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 foo;\n\npublic class TestCompile0Test {\n    public void testCompile0Test() {\n        TestCompile0 test = new TestCompile0();\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-failonerror-test/plugin-config.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <failOnError>false</failOnError>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <compilerId>maven-failing-compiler-stub</compilerId>\n          <incrementalCompilation>none</incrementalCompilation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-failonerror-test/src/main/java/TestCompile0.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 foo;\n\npublic class TestCompile0 {\n\n    public TestCompile0() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-failonerror-test/src/test/java/TestCompile0Test.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 foo;\n\npublic class TestCompile0Test {\n    public void testCompile0Test() {\n        TestCompile0 test = new TestCompile0();\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-fork-test/plugin-config.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <fork>true</fork>\n          <release>17</release>\n          <!--\n             basedir is required to be set when forking\n          -->\n          <basedir>${project.basedir}</basedir>\n          <meminitial>64m</meminitial>\n          <maxmem>128m</maxmem>\n          <showWarnings>true</showWarnings>\n          <verbose>true</verbose>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <incrementalCompilation>none</incrementalCompilation>\n          <executable>javac</executable>\n          <!--\n             <executable>${env.JAVA_HOME}/bin/javac</executable>\n             This value would have been better, but ${env.JAVA_HOME} can't be resolved.\n             So it is adjusted in org.apache.maven.plugin.compiler.CompilerMojoTestCase.testCompilerFork()\n           -->\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-fork-test/src/main/java/foo/TestCompile1.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 foo;\n\npublic class TestCompile1 {\n\n    public TestCompile1() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-fork-test/src/test/java/foo/TestCompile1TestCase.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 foo;\n\npublic class TestCompile1TestCase {\n    public void testCompile1() {\n        TestCompile1 test = new TestCompile1();\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-implicit-test/plugin-config-none.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <incrementalCompilation>none</incrementalCompilation>\n          <implicit>none</implicit>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-implicit-test/plugin-config-not-set.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <incrementalCompilation>none</incrementalCompilation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-includes-excludes-test/plugin-config.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <includes>\n            <include>**/TestCompile4.java</include>\n          </includes>\n          <excludes>\n            <exclude>**/TestCompile2*.java</exclude>\n            <exclude>**/TestCompile3*.java</exclude>\n          </excludes>\n          <testIncludes>\n            <includes>**/TestCompile4*.java</includes>\n          </testIncludes>\n          <testExcludes>\n            <exclude>**/TestCompile2*.java</exclude>\n            <exclude>**/TestCompile3*.java</exclude>\n          </testExcludes>\n          <incrementalCompilation>none</incrementalCompilation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-includes-excludes-test/src/main/java/foo/TestCompile2.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 foo;\n\npublic class TestCompile2 {\n\n    public TestCompile2() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-includes-excludes-test/src/main/java/foo/TestCompile3.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 foo;\n\npublic class TestCompile3 {\n\n    public TestCompile3() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-includes-excludes-test/src/main/java/foo/TestCompile4.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 foo;\n\npublic class TestCompile4 {\n\n    public TestCompile4() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-includes-excludes-test/src/test/java/foo/TestCompile2TestCase.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 foo;\n\npublic class TestCompile2TestCase {\n    public void testCompile2() {\n        TestCompile2 test = new TestCompile2();\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-includes-excludes-test/src/test/java/foo/TestCompile3TestCase.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 foo;\n\npublic class TestCompile3TestCase {\n    public void testCompile3() {\n        TestCompile3 test = new TestCompile3();\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-includes-excludes-test/src/test/java/foo/TestCompile4TestCase.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 foo;\n\npublic class TestCompile4TestCase {\n    public void testCompile4() {\n        TestCompile4 test = new TestCompile4();\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-modular-project/plugin-config.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <incrementalCompilation>none</incrementalCompilation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-modular-project/src/main/java/foo/TestModular.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 foo;\n\npublic class TestModular {\n\n    public TestModular() {\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-modular-project/src/main/java/module-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 */\nmodule foo.bar {}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-modular-project/src/test/java/foo/TestModularTestCase.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 foo;\n\npublic class TestModularTestCase {\n    public void test() {\n        TestModular test = new TestModular();\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-one-output-file-test/plugin-config.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <compilerId>maven-compiler-stub</compilerId>\n          <incrementalCompilation>none</incrementalCompilation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile2.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 foo;\n\npublic class TestCompile2 {\n\n    public TestCompile2() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile3.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 foo;\n\npublic class TestCompile3 {\n\n    public TestCompile3() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-one-output-file-test/src/main/java/TestCompile4.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 foo;\n\npublic class TestCompile4 {\n\n    public TestCompile4() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile2TestCase.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 foo;\n\npublic class TestCompile2TestCase {\n    public void testCompile2() {\n        TestCompile2 test = new TestCompile2();\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile3TestCase.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 foo;\n\npublic class TestCompile3TestCase {\n    public void testCompile3() {\n        TestCompile3 test = new TestCompile3();\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-one-output-file-test/src/test/java/TestCompile4TestCase.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 foo;\n\npublic class TestCompile4TestCase {\n    public void testCompile4() {\n        TestCompile4 test = new TestCompile4();\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-skip-main/plugin-config.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <incrementalCompilation>none</incrementalCompilation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-skip-main/src/main/java/foo/TestSkipMainCompile0.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 foo;\n\npublic class TestSkipMainCompile0 {\n\n    public TestSkipMainCompile0() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-skip-main/src/test/java/foo/TestSkipMainCompile0Test.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 foo;\n\npublic class TestSkipMainCompile0Test {\n    public void testSkipMainCompile0Test() {}\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-skip-test/plugin-config.xml",
    "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<project>\n  <build>\n    <directory>${project.basedir}/target</directory>\n    <outputDirectory>${project.basedir}/target/classes</outputDirectory>\n    <testOutputDirectory>${project.basedir}/target/test-classes</testOutputDirectory>\n    <plugins>\n      <plugin>\n        <artifactId>maven-compiler-plugin</artifactId>\n        <configuration>\n          <compileSourceRoots>\n            <compileSourceRoot>${project.basedir}/src/main/java</compileSourceRoot>\n          </compileSourceRoots>\n          <incrementalCompilation>none</incrementalCompilation>\n        </configuration>\n      </plugin>\n    </plugins>\n  </build>\n</project>\n"
  },
  {
    "path": "src/test/resources/unit/compiler-skip-test/src/main/java/foo/TestSkipTestCompile0.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 foo;\n\npublic class TestSkipTestCompile0 {\n\n    public TestSkipTestCompile0() {\n\n        System.out.println(\"Woo Hoo!\");\n    }\n}\n"
  },
  {
    "path": "src/test/resources/unit/compiler-skip-test/src/test/java/foo/TestSkipTestCompile0Test.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 foo;\n\npublic class TestSkipTestCompile0Test {\n    public void testSkipTestCompile0Test() {\n        TestSkipTestCompile0 test = new TestSkipTestCompile0();\n    }\n}\n"
  }
]