[
  {
    "path": ".appveyor/toolchains.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<toolchains>\n    <toolchain>\n        <type>jdk</type>\n        <provides>\n            <version>1.8</version>\n            <vendor>OpenJDK</vendor>\n            <id>openjdk8</id>\n        </provides>\n        <configuration>\n            <jdkHome>C:/Program Files/Java/jdk1.8.0</jdkHome>\n        </configuration>\n    </toolchain>\n    <toolchain>\n        <type>protobuf</type>\n        <provides>\n            <version>3.4.0</version>\n        </provides>\n        <configuration>\n            <protocExecutable>\n                C:/Users/appveyor/.m2/repository/com/google/protobuf/protoc/3.4.0/protoc-3.4.0-windows-x86_64.exe\n            </protocExecutable>\n        </configuration>\n    </toolchain>\n    <toolchain>\n        <type>protobuf</type>\n        <provides>\n            <version>3.11.1</version>\n        </provides>\n        <configuration>\n            <protocExecutable>\n                C:/Users/appveyor/.m2/repository/com/google/protobuf/protoc/3.11.1/protoc-3.11.1-windows-x86_64.exe\n            </protocExecutable>\n        </configuration>\n    </toolchain>\n</toolchains>\n"
  },
  {
    "path": ".appveyor.yml",
    "content": "version: '{build}'\n\nskip_tags: true\n\nenvironment:\n  JAVA_HOME: 'C:\\Program Files\\Java\\jdk1.8.0'\n\ninstall:\n  # Prepend Java entry to PATH\n  - cmd: SET PATH=%JAVA_HOME%\\bin;%PATH%\n  - cmd: SET MAVEN_OPTS=-Xmx2g\n  - cmd: SET JAVA_OPTS=-Xmx2g\n  - cmd: java -version\n  # Set up toolchains for java and protoc\n  - cmd: if not exist %USERPROFILE%\\.m2 mkdir %USERPROFILE%\\.m2\n  - cmd: copy .appveyor\\toolchains.xml %USERPROFILE%\\.m2\\\n  # Download all dependencies that integration tests might need later\n  # These include protoc and grpc plugin executables being referenced in toolchains.xml\n  - cmd: mvnw.cmd -B -V -Dstyle.color=always -Djansi.passthrough=true dependency:go-offline -f src/it/dependencies/pom.xml -P protoc-3.4.0\n  - cmd: mvnw.cmd -B -V -Dstyle.color=always -Djansi.passthrough=true dependency:go-offline -f src/it/dependencies/pom.xml -P protoc-3.11.1\n  - cmd: mvnw.cmd -B -V -Dstyle.color=always -Djansi.passthrough=true dependency:go-offline -P run-its\n\nbuild_script:\n  - cmd: mvnw.cmd -B -V -Dstyle.color=always -Djansi.passthrough=true clean package -Dmaven.test.skip=true\n\ntest_script:\n  - cmd: mvnw.cmd -B -V -Dstyle.color=always -Djansi.passthrough=true verify -P run-its -Dinvoker.streamLogs=true\n\ncache:\n  - '%USERPROFILE%\\.m2\\'\n"
  },
  {
    "path": ".editorconfig",
    "content": "# http://editorconfig.org\n\n# A special property that should be specified at the top of the file outside of any sections.\n# Set to true to stop .editorconfig file search on the current file.\nroot = true\n\n[*]\ncharset                     = utf-8\ntrim_trailing_whitespace    = true\ninsert_final_newline        = true\nindent_style                = space\nindent_size                 = 4\ncontinuation_indent_size    = 8\nmax_line_length             = 120\n\n[*.{yml,yaml,json}]\nindent_size                 = 2\n"
  },
  {
    "path": ".gitattributes",
    "content": "# Set the default behaviour, in case users don't have core.autocrlf set\n* text=auto\n\n# Explicitly declare text files we want to always be normalized and converted to native line endings on checkout\n*.md            text\n*.java          text\n*.properties    text\n*.proto         text\n\n# Declare files that will always have LF line endings on checkout.\n*.pom           text eol=lf\npom.xml         text eol=lf\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\n\n---\n\n**Before submitting a bug report**\n- [ ] Check the existing issues, please avoid submitting duplicates\n- [ ] Check the [FAQ](https://www.xolstice.org/protobuf-maven-plugin/faq.html) for known problems\n- [ ] Try asking on [Gitter](https://gitter.im/xolstice/protobuf-maven-plugin)\n\n**Describe the bug**\n<!-- A clear and concise description of what the bug is -->\n\n**Environment**\n<!-- Please paste the output of `mvn --version` below: -->\n```\n...\n```\n\n**Standalone or IDE**\nAre you are running Maven inside an IDE, and in that case, which IDE?\n\n**Plugin configuration**\n<!-- Paste below the relevant section(s) from your POM, or a link to a gist containing the entire POM -->\n```\n...\n```\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. ...\n2. ...\n\n**Log output**\n<!-- Please paste the relevant portion of maven log output below -->\n```\n...\n```\n\n**Expected behavior**\n<!-- A clear and concise description of what you expected to happen -->\n\n**Additional context**\n<!-- Add any other context about the problem here -->\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\n\n---\n\n**Is your feature request related to a problem? Please describe.**\nA clear and concise description of what the problem is.\n\n**Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n**Additional context**\nAdd any other context about the feature request here.\n"
  },
  {
    "path": ".github/pull_request_template.md",
    "content": "**Applicable Issues**\n<!-- If this pull request fixes an existing issue, please reference it below -->\nFixes #...\n\n**Description**\n<!-- Please add a meaningful description of the proposed change here -->\n"
  },
  {
    "path": ".gitignore",
    "content": "# IDEA project files\n.idea*\n*.ipr\n*.iws\n*.iml\n\n# Eclipse project files\n.classpath\n.project\n.settings\n\n# Maven output\ntarget\n*.releaseBackup\npom.xml.versionsBackup\nrelease.properties\n.mvn/timing.properties\n"
  },
  {
    "path": ".mvn/wrapper/maven-wrapper.properties",
    "content": "distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip"
  },
  {
    "path": ".travis/toolchains.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<toolchains>\n    <toolchain>\n        <type>jdk</type>\n        <provides>\n            <version>1.8</version>\n            <vendor>OpenJDK</vendor>\n            <id>openjdk8</id>\n        </provides>\n        <configuration>\n            <jdkHome>/usr/lib/jvm/java-8-openjdk-amd64</jdkHome>\n        </configuration>\n    </toolchain>\n    <toolchain>\n        <type>protobuf</type>\n        <provides>\n            <version>3.4.0</version>\n        </provides>\n        <configuration>\n            <protocExecutable>\n                /home/travis/.m2/repository/com/google/protobuf/protoc/3.4.0/protoc-3.4.0-linux-x86_64.exe\n            </protocExecutable>\n        </configuration>\n    </toolchain>\n    <toolchain>\n        <type>protobuf</type>\n        <provides>\n            <version>3.11.1</version>\n        </provides>\n        <configuration>\n            <protocExecutable>\n                /home/travis/.m2/repository/com/google/protobuf/protoc/3.11.1/protoc-3.11.1-linux-x86_64.exe\n            </protocExecutable>\n        </configuration>\n    </toolchain>\n</toolchains>\n"
  },
  {
    "path": ".travis.yml",
    "content": "dist: trusty\nsudo: false\n\nlanguage: java\njdk: openjdk8\n\nbefore_install:\n  # Set up toolchains for java and protoc\n  # Protoc executables will be downloaded in the next phase\n  - mkdir -p $HOME/.m2\n  - cp .travis/toolchains.xml $HOME/.m2/\n\ninstall:\n  # Download all dependencies that integration tests might need later\n  - ./mvnw -B -V -Dstyle.color=always dependency:go-offline -f src/it/dependencies/pom.xml -P protoc-3.4.0\n  - ./mvnw -B -V -Dstyle.color=always dependency:go-offline -f src/it/dependencies/pom.xml -P protoc-3.11.1\n  - ./mvnw -B -V -Dstyle.color=always dependency:go-offline -P run-its\n\nbefore_script:\n  # These protoc executables were downloaded in the previous phase and are being referenced in toolchains.xml\n  - chmod +x $HOME/.m2/repository/com/google/protobuf/protoc/3.4.0/protoc-3.4.0-linux-x86_64.exe\n  - chmod +x $HOME/.m2/repository/com/google/protobuf/protoc/3.11.1/protoc-3.11.1-linux-x86_64.exe\n\nscript:\n  # Finally, run the build with integration tests\n  - ./mvnw -B -V -Dstyle.color=always clean verify -P run-its -Dinvoker.streamLogs=true\n\ncache:\n  directories:\n    - $HOME/.m2\n"
  },
  {
    "path": "AUTHORS",
    "content": "# This is the official list of Maven Protocol Buffers Plugin authors for copyright purposes.\n# This file is distinct from the CONTRIBUTORS files.\n# See the latter for an explanation.\n#\n# Names should be added to this file as one of\n#     Organization's name\n#     Individual's name <submission email address>\n#     Individual's name <submission email address> <email2> <emailN>\n# See CONTRIBUTORS for the meaning of multiple email addresses.\n#\n# Please keep the list sorted.\n\nGoogle, Inc.\nSergei Ivanov <sergei@xolstice.org> <sergei_ivanov@mail.ru>\nXolstice Ltd.\n"
  },
  {
    "path": "CONTRIBUTORS",
    "content": "# This is the official list of people who have contributed\n# code to the Maven Protocol Buffers Plugin repository.\n# The AUTHORS file lists the copyright holders; this file\n# lists people.\n#\n# Names should be added to this file like so:\n#     Individual's name <submission email address>\n#     Individual's name <submission email address> <email2> <emailN>\n#\n# Where applicable, GitHub user name may be added in parentheses\n# after the Individual's name.\n#\n# Please keep the list sorted.\n\nAlexander Torstling (atorstling) <alexander@torstling.com>\nAndrey Batalev <andrey.batalev@gmail.com>\nBrice Figureau (masterzen) <brice@daysofwonder.com>\nChris Heisterkamp (cheister) <cheister@squareup.com>\nCosmin Lehene (clehene) <clehene@gmail.com>\nDaniel Evans (devans) <daniel.evans@plymouthsystems.com> <devans@greenenergycorp.com>\nDavid Reichert (davidmreichert) <davidmreichert@gmail.com>\nDavid Trott (dtrott) <github@davidtrott.com>\nGregory Kick <gak@google.com>\nJulien Henry (henryju) <julien.henry@sonarsource.com>\nLaurent Goujon (laurentgo) <laurent@dremio.com>\nMarek Kedzierski (kedzie) <mark.kedzierski@gmail.com>\nRob Wicke (rwicke) <rwicke@me.com> <rwicke@mac.com>\nSergei Ivanov (sergei-ivanov) <sergei@xolstice.org> <sergei_ivanov@mail.ru>\n"
  },
  {
    "path": "LICENSE",
    "content": "This license applies to all parts of Maven Protocol Buffers Plugin except the following:\n\n  - WinRun4J Java launcher binaries, located in\n    src/main/resources/winrun4j/*.exe\n    These files are copyrighted by WinRun4J Authors,\n    please see the NOTICE file for licensing details.\n\nMaven Protocol Buffers Plugin\nCopyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\n\n================================================================================\n\n\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": "Maven Protocol Buffers Plugin\nCopyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\n\n================================================================================\n\nThis software includes a binary distribution of WinRun4J,\nwhich is used to execute protoc plugins written in Java\nunder 32-bit and 64-bit Windows operating systems.\n\nWinRun4J is licensed under the Common Public License (CPL).\nhttp://www.eclipse.org/legal/cpl-v10.html\n\nAdditional information about WinRun4J is available on\nthe project's home page:\nhttp://winrun4j.sourceforge.net/\n\nFor information about the bundled versions of the binaries\nplease read src/main/resources/winrun4j/README.txt\ninside this git repository.\n"
  },
  {
    "path": "README.md",
    "content": "[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/xolstice/protobuf-maven-plugin/master/LICENSE)\n[![Maven Central](https://img.shields.io/maven-central/v/org.xolstice.maven.plugins/protobuf-maven-plugin.svg)](https://repo1.maven.org/maven2/org/xolstice/maven/plugins/protobuf-maven-plugin/)\n\n> [!IMPORTANT]\n> This project is no longer being maintained, and no further contributions will be considered.\n> \n> Please consider switching to alternatives, such as: \\\n> https://github.com/ascopes/protobuf-maven-plugin\n\n# Maven Protocol Buffers Plugin\n\nA plugin that integrates protocol buffers compiler (`protoc`) into Maven lifecycle.\nThis is a continuation of `maven-protoc-plugin` that was started at Google\nand later developed by GitHub community.\n\n[Release notes](https://www.xolstice.org/protobuf-maven-plugin/changes-report.html) and detailed documentation\nare available on the [web site](https://www.xolstice.org/protobuf-maven-plugin/).\n"
  },
  {
    "path": "docs/CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as\ncontributors and maintainers pledge to making participation in our project and\nour community a harassment-free experience for everyone, regardless of age, body\nsize, disability, ethnicity, gender identity and expression, level of experience,\neducation, socio-economic status, nationality, personal appearance, race,\nreligion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment\ninclude:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or\n  advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic\n  address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable\nbehavior and are expected to take appropriate and fair corrective action in\nresponse to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or\nreject comments, commits, code, wiki edits, issues, and other contributions\nthat are not aligned to this Code of Conduct, or to ban temporarily or\npermanently any contributor for other behaviors that they deem inappropriate,\nthreatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces\nwhen an individual is representing the project or its community. Examples of\nrepresenting a project or community include using an official project e-mail\naddress, posting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event. Representation of a project may be\nfurther defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported by contacting the project team at [code-of-conduct@xolstice.org][email]. All\ncomplaints will be reviewed and investigated and will result in a response that\nis deemed necessary and appropriate to the circumstances. The project team is\nobligated to maintain confidentiality with regard to the reporter of an incident.\nFurther details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good\nfaith may face temporary or permanent repercussions as determined by other\nmembers of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,\navailable at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][version]\n\n[homepage]: https://www.contributor-covenant.org\n[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html\n[email]: mailto:code-of-conduct@xolstice.org\n"
  },
  {
    "path": "docs/CONTRIBUTING.md",
    "content": "# Contributor's Guide\n\n## Code of Conduct\n\nThis project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.\n\n## I don't want to read this whole thing I just have a question!!!\n\n> **Note:** Please don't file an issue to ask a question. \n> You'll usually get faster feedback on Gitter.\n\nJoin the chat on [Gitter](https://gitter.im/xolstice/protobuf-maven-plugin) and post your question there.\n\n## How you can help\n\n  As with any open source project, there are several ways you can help:\n  * Submit [bug reports](#reporting-bugs) and feature requests into the issue tracker\n  * Submit [patches](#patches) to reported issues (both those you find, or that others have filed)\n  * Help with the documentation\n\n## Reporting bugs\n\n  Please provide detailed information about your environment and steps to reproduce the problem.\n  Specifically, please include the following:\n\n  * Output of `mvn --version` command:\n    * Operating system\n    * Maven version\n    * Java version\n  * Whether you are running Maven inside an IDE, and in that case, which IDE\n  * Plugin configuration\n  * Any relevant information from the log files\n\n## Patches\n\n  Patches and pull requests are very welcome as long as they adhere to the following simple rules:\n\n  * the existing coding style is preserved;\n  * the patch does not needlessly introduce major code refactorings;\n  * the patch preserves backwards compatibility;\n  * no existing integration tests are broken by the patch;\n  * code and site documentation is updated, all new goals and parameters are marked with `@since <version>` tag;\n  * javadocs are kept compliant with doclint;\n  * ideally, integration tests are provided to cover the changes introduced in the patch.\n"
  },
  {
    "path": "mvnw",
    "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\n# ----------------------------------------------------------------------------\n# Maven2 Start Up Batch script\n#\n# Required ENV vars:\n# ------------------\n#   JAVA_HOME - location of a JDK home dir\n#\n# Optional ENV vars\n# -----------------\n#   M2_HOME - location of maven2's installed home dir\n#   MAVEN_OPTS - parameters passed to the Java VM when running Maven\n#     e.g. to debug Maven itself, use\n#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000\n#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files\n# ----------------------------------------------------------------------------\n\nif [ -z \"$MAVEN_SKIP_RC\" ] ; then\n\n  if [ -f /etc/mavenrc ] ; then\n    . /etc/mavenrc\n  fi\n\n  if [ -f \"$HOME/.mavenrc\" ] ; then\n    . \"$HOME/.mavenrc\"\n  fi\n\nfi\n\n# OS specific support.  $var _must_ be set to either true or false.\ncygwin=false;\ndarwin=false;\nmingw=false\ncase \"`uname`\" in\n  CYGWIN*) cygwin=true ;;\n  MINGW*) mingw=true;;\n  Darwin*) darwin=true\n    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home\n    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html\n    if [ -z \"$JAVA_HOME\" ]; then\n      if [ -x \"/usr/libexec/java_home\" ]; then\n        export JAVA_HOME=\"`/usr/libexec/java_home`\"\n      else\n        export JAVA_HOME=\"/Library/Java/Home\"\n      fi\n    fi\n    ;;\nesac\n\nif [ -z \"$JAVA_HOME\" ] ; then\n  if [ -r /etc/gentoo-release ] ; then\n    JAVA_HOME=`java-config --jre-home`\n  fi\nfi\n\nif [ -z \"$M2_HOME\" ] ; then\n  ## resolve links - $0 may be a link to maven's home\n  PRG=\"$0\"\n\n  # need this for relative symlinks\n  while [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n      PRG=\"$link\"\n    else\n      PRG=\"`dirname \"$PRG\"`/$link\"\n    fi\n  done\n\n  saveddir=`pwd`\n\n  M2_HOME=`dirname \"$PRG\"`/..\n\n  # make it fully qualified\n  M2_HOME=`cd \"$M2_HOME\" && pwd`\n\n  cd \"$saveddir\"\n  # echo Using m2 at $M2_HOME\nfi\n\n# For Cygwin, ensure paths are in UNIX format before anything is touched\nif $cygwin ; then\n  [ -n \"$M2_HOME\" ] &&\n    M2_HOME=`cygpath --unix \"$M2_HOME\"`\n  [ -n \"$JAVA_HOME\" ] &&\n    JAVA_HOME=`cygpath --unix \"$JAVA_HOME\"`\n  [ -n \"$CLASSPATH\" ] &&\n    CLASSPATH=`cygpath --path --unix \"$CLASSPATH\"`\nfi\n\n# For Mingw, ensure paths are in UNIX format before anything is touched\nif $mingw ; then\n  [ -n \"$M2_HOME\" ] &&\n    M2_HOME=\"`(cd \"$M2_HOME\"; pwd)`\"\n  [ -n \"$JAVA_HOME\" ] &&\n    JAVA_HOME=\"`(cd \"$JAVA_HOME\"; pwd)`\"\n  # TODO classpath?\nfi\n\nif [ -z \"$JAVA_HOME\" ]; then\n  javaExecutable=\"`which javac`\"\n  if [ -n \"$javaExecutable\" ] && ! [ \"`expr \\\"$javaExecutable\\\" : '\\([^ ]*\\)'`\" = \"no\" ]; then\n    # readlink(1) is not available as standard on Solaris 10.\n    readLink=`which readlink`\n    if [ ! `expr \"$readLink\" : '\\([^ ]*\\)'` = \"no\" ]; then\n      if $darwin ; then\n        javaHome=\"`dirname \\\"$javaExecutable\\\"`\"\n        javaExecutable=\"`cd \\\"$javaHome\\\" && pwd -P`/javac\"\n      else\n        javaExecutable=\"`readlink -f \\\"$javaExecutable\\\"`\"\n      fi\n      javaHome=\"`dirname \\\"$javaExecutable\\\"`\"\n      javaHome=`expr \"$javaHome\" : '\\(.*\\)/bin'`\n      JAVA_HOME=\"$javaHome\"\n      export JAVA_HOME\n    fi\n  fi\nfi\n\nif [ -z \"$JAVACMD\" ] ; then\n  if [ -n \"$JAVA_HOME\"  ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n      # IBM's JDK on AIX uses strange locations for the executables\n      JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n      JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n  else\n    JAVACMD=\"`which java`\"\n  fi\nfi\n\nif [ ! -x \"$JAVACMD\" ] ; then\n  echo \"Error: JAVA_HOME is not defined correctly.\" >&2\n  echo \"  We cannot execute $JAVACMD\" >&2\n  exit 1\nfi\n\nif [ -z \"$JAVA_HOME\" ] ; then\n  echo \"Warning: JAVA_HOME environment variable is not set.\"\nfi\n\nCLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher\n\n# traverses directory structure from process work directory to filesystem root\n# first directory with .mvn subdirectory is considered project base directory\nfind_maven_basedir() {\n\n  if [ -z \"$1\" ]\n  then\n    echo \"Path not specified to find_maven_basedir\"\n    return 1\n  fi\n\n  basedir=\"$1\"\n  wdir=\"$1\"\n  while [ \"$wdir\" != '/' ] ; do\n    if [ -d \"$wdir\"/.mvn ] ; then\n      basedir=$wdir\n      break\n    fi\n    # workaround for JBEAP-8937 (on Solaris 10/Sparc)\n    if [ -d \"${wdir}\" ]; then\n      wdir=`cd \"$wdir/..\"; pwd`\n    fi\n    # end of workaround\n  done\n  echo \"${basedir}\"\n}\n\n# concatenates all lines of a file\nconcat_lines() {\n  if [ -f \"$1\" ]; then\n    echo \"$(tr -s '\\n' ' ' < \"$1\")\"\n  fi\n}\n\nBASE_DIR=`find_maven_basedir \"$(pwd)\"`\nif [ -z \"$BASE_DIR\" ]; then\n  exit 1;\nfi\n\n##########################################################################################\n# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central\n# This allows using the maven wrapper in projects that prohibit checking in binary data.\n##########################################################################################\nif [ -r \"$BASE_DIR/.mvn/wrapper/maven-wrapper.jar\" ]; then\n    if [ \"$MVNW_VERBOSE\" = true ]; then\n      echo \"Found .mvn/wrapper/maven-wrapper.jar\"\n    fi\nelse\n    if [ \"$MVNW_VERBOSE\" = true ]; then\n      echo \"Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ...\"\n    fi\n    jarUrl=\"https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar\"\n    while IFS=\"=\" read key value; do\n      case \"$key\" in (wrapperUrl) jarUrl=\"$value\"; break ;;\n      esac\n    done < \"$BASE_DIR/.mvn/wrapper/maven-wrapper.properties\"\n    if [ \"$MVNW_VERBOSE\" = true ]; then\n      echo \"Downloading from: $jarUrl\"\n    fi\n    wrapperJarPath=\"$BASE_DIR/.mvn/wrapper/maven-wrapper.jar\"\n\n    if command -v wget > /dev/null; then\n        if [ \"$MVNW_VERBOSE\" = true ]; then\n          echo \"Found wget ... using wget\"\n        fi\n        wget \"$jarUrl\" -O \"$wrapperJarPath\"\n    elif command -v curl > /dev/null; then\n        if [ \"$MVNW_VERBOSE\" = true ]; then\n          echo \"Found curl ... using curl\"\n        fi\n        curl -o \"$wrapperJarPath\" \"$jarUrl\"\n    else\n        if [ \"$MVNW_VERBOSE\" = true ]; then\n          echo \"Falling back to using Java to download\"\n        fi\n        javaClass=\"$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java\"\n        if [ -e \"$javaClass\" ]; then\n            if [ ! -e \"$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class\" ]; then\n                if [ \"$MVNW_VERBOSE\" = true ]; then\n                  echo \" - Compiling MavenWrapperDownloader.java ...\"\n                fi\n                # Compiling the Java class\n                (\"$JAVA_HOME/bin/javac\" \"$javaClass\")\n            fi\n            if [ -e \"$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class\" ]; then\n                # Running the downloader\n                if [ \"$MVNW_VERBOSE\" = true ]; then\n                  echo \" - Running MavenWrapperDownloader.java ...\"\n                fi\n                (\"$JAVA_HOME/bin/java\" -cp .mvn/wrapper MavenWrapperDownloader \"$MAVEN_PROJECTBASEDIR\")\n            fi\n        fi\n    fi\nfi\n##########################################################################################\n# End of extension\n##########################################################################################\n\nexport MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-\"$BASE_DIR\"}\nif [ \"$MVNW_VERBOSE\" = true ]; then\n  echo $MAVEN_PROJECTBASEDIR\nfi\nMAVEN_OPTS=\"$(concat_lines \"$MAVEN_PROJECTBASEDIR/.mvn/jvm.config\") $MAVEN_OPTS\"\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin; then\n  [ -n \"$M2_HOME\" ] &&\n    M2_HOME=`cygpath --path --windows \"$M2_HOME\"`\n  [ -n \"$JAVA_HOME\" ] &&\n    JAVA_HOME=`cygpath --path --windows \"$JAVA_HOME\"`\n  [ -n \"$CLASSPATH\" ] &&\n    CLASSPATH=`cygpath --path --windows \"$CLASSPATH\"`\n  [ -n \"$MAVEN_PROJECTBASEDIR\" ] &&\n    MAVEN_PROJECTBASEDIR=`cygpath --path --windows \"$MAVEN_PROJECTBASEDIR\"`\nfi\n\nWRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain\n\nexec \"$JAVACMD\" \\\n  $MAVEN_OPTS \\\n  -classpath \"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar\" \\\n  \"-Dmaven.home=${M2_HOME}\" \"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}\" \\\n  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG \"$@\"\n"
  },
  {
    "path": "mvnw.cmd",
    "content": "@REM ----------------------------------------------------------------------------\n@REM Licensed to the Apache Software Foundation (ASF) under one\n@REM or more contributor license agreements.  See the NOTICE file\n@REM distributed with this work for additional information\n@REM regarding copyright ownership.  The ASF licenses this file\n@REM to you under the Apache License, Version 2.0 (the\n@REM \"License\"); you may not use this file except in compliance\n@REM with the License.  You may obtain a copy of the License at\n@REM\n@REM    http://www.apache.org/licenses/LICENSE-2.0\n@REM\n@REM Unless required by applicable law or agreed to in writing,\n@REM software distributed under the License is distributed on an\n@REM \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n@REM KIND, either express or implied.  See the License for the\n@REM specific language governing permissions and limitations\n@REM under the License.\n@REM ----------------------------------------------------------------------------\n\n@REM ----------------------------------------------------------------------------\n@REM Maven2 Start Up Batch script\n@REM\n@REM Required ENV vars:\n@REM JAVA_HOME - location of a JDK home dir\n@REM\n@REM Optional ENV vars\n@REM M2_HOME - location of maven2's installed home dir\n@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands\n@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending\n@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven\n@REM     e.g. to debug Maven itself, use\n@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000\n@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files\n@REM ----------------------------------------------------------------------------\n\n@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'\n@echo off\n@REM set title of command window\ntitle %0\n@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'\n@if \"%MAVEN_BATCH_ECHO%\" == \"on\"  echo %MAVEN_BATCH_ECHO%\n\n@REM set %HOME% to equivalent of $HOME\nif \"%HOME%\" == \"\" (set \"HOME=%HOMEDRIVE%%HOMEPATH%\")\n\n@REM Execute a user defined script before this one\nif not \"%MAVEN_SKIP_RC%\" == \"\" goto skipRcPre\n@REM check for pre script, once with legacy .bat ending and once with .cmd ending\nif exist \"%HOME%\\mavenrc_pre.bat\" call \"%HOME%\\mavenrc_pre.bat\"\nif exist \"%HOME%\\mavenrc_pre.cmd\" call \"%HOME%\\mavenrc_pre.cmd\"\n:skipRcPre\n\n@setlocal\n\nset ERROR_CODE=0\n\n@REM To isolate internal variables from possible post scripts, we use another setlocal\n@setlocal\n\n@REM ==== START VALIDATION ====\nif not \"%JAVA_HOME%\" == \"\" goto OkJHome\n\necho.\necho Error: JAVA_HOME not found in your environment. >&2\necho Please set the JAVA_HOME variable in your environment to match the >&2\necho location of your Java installation. >&2\necho.\ngoto error\n\n:OkJHome\nif exist \"%JAVA_HOME%\\bin\\java.exe\" goto init\n\necho.\necho Error: JAVA_HOME is set to an invalid directory. >&2\necho JAVA_HOME = \"%JAVA_HOME%\" >&2\necho Please set the JAVA_HOME variable in your environment to match the >&2\necho location of your Java installation. >&2\necho.\ngoto error\n\n@REM ==== END VALIDATION ====\n\n:init\n\n@REM Find the project base dir, i.e. the directory that contains the folder \".mvn\".\n@REM Fallback to current working directory if not found.\n\nset MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%\nIF NOT \"%MAVEN_PROJECTBASEDIR%\"==\"\" goto endDetectBaseDir\n\nset EXEC_DIR=%CD%\nset WDIR=%EXEC_DIR%\n:findBaseDir\nIF EXIST \"%WDIR%\"\\.mvn goto baseDirFound\ncd ..\nIF \"%WDIR%\"==\"%CD%\" goto baseDirNotFound\nset WDIR=%CD%\ngoto findBaseDir\n\n:baseDirFound\nset MAVEN_PROJECTBASEDIR=%WDIR%\ncd \"%EXEC_DIR%\"\ngoto endDetectBaseDir\n\n:baseDirNotFound\nset MAVEN_PROJECTBASEDIR=%EXEC_DIR%\ncd \"%EXEC_DIR%\"\n\n:endDetectBaseDir\n\nIF NOT EXIST \"%MAVEN_PROJECTBASEDIR%\\.mvn\\jvm.config\" goto endReadAdditionalConfig\n\n@setlocal EnableExtensions EnableDelayedExpansion\nfor /F \"usebackq delims=\" %%a in (\"%MAVEN_PROJECTBASEDIR%\\.mvn\\jvm.config\") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a\n@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%\n\n:endReadAdditionalConfig\n\nSET MAVEN_JAVA_EXE=\"%JAVA_HOME%\\bin\\java.exe\"\nset WRAPPER_JAR=\"%MAVEN_PROJECTBASEDIR%\\.mvn\\wrapper\\maven-wrapper.jar\"\nset WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain\n\nset DOWNLOAD_URL=\"https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar\"\nFOR /F \"tokens=1,2 delims==\" %%A IN (%MAVEN_PROJECTBASEDIR%\\.mvn\\wrapper\\maven-wrapper.properties) DO (\n\tIF \"%%A\"==\"wrapperUrl\" SET DOWNLOAD_URL=%%B \n)\n\n@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central\n@REM This allows using the maven wrapper in projects that prohibit checking in binary data.\nif exist %WRAPPER_JAR% (\n    echo Found %WRAPPER_JAR%\n) else (\n    echo Couldn't find %WRAPPER_JAR%, downloading it ...\n\techo Downloading from: %DOWNLOAD_URL%\n    powershell -Command \"(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')\"\n    echo Finished downloading %WRAPPER_JAR%\n)\n@REM End of extension\n\n%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% \"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%\" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*\nif ERRORLEVEL 1 goto error\ngoto end\n\n:error\nset ERROR_CODE=1\n\n:end\n@endlocal & set ERROR_CODE=%ERROR_CODE%\n\nif not \"%MAVEN_SKIP_RC%\" == \"\" goto skipRcPost\n@REM check for post script, once with legacy .bat ending and once with .cmd ending\nif exist \"%HOME%\\mavenrc_post.bat\" call \"%HOME%\\mavenrc_post.bat\"\nif exist \"%HOME%\\mavenrc_post.cmd\" call \"%HOME%\\mavenrc_post.cmd\"\n:skipRcPost\n\n@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'\nif \"%MAVEN_BATCH_PAUSE%\" == \"on\" pause\n\nif \"%MAVEN_TERMINATE_CMD%\" == \"on\" exit %ERROR_CODE%\n\nexit /B %ERROR_CODE%\n"
  },
  {
    "path": "pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\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.xolstice.maven.plugins</groupId>\n    <artifactId>protobuf-maven-plugin</artifactId>\n    <packaging>maven-plugin</packaging>\n    <name>Maven Protocol Buffers Plugin</name>\n    <version>0.7.0-SNAPSHOT</version>\n    <url>https://www.xolstice.org/protobuf-maven-plugin</url>\n    <description>Maven Plugin that executes the Protocol Buffers (protoc) compiler</description>\n    <inceptionYear>2016</inceptionYear>\n\n    <properties>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n\n        <!-- JDK version -->\n        <java.sdk.version>1.8</java.sdk.version>\n        <!-- Settings for the java compiler -->\n        <java.compiler.compilerVersion>${java.sdk.version}</java.compiler.compilerVersion>\n        <java.compiler.source>${java.sdk.version}</java.compiler.source>\n        <java.compiler.target>${java.sdk.version}</java.compiler.target>\n\n        <mavenVersion>3.3.9</mavenVersion>\n        <plexusComponentVersion>2.1.0</plexusComponentVersion>\n        <plexusUtilsVersion>3.3.0</plexusUtilsVersion>\n        <pluginToolsVersion>3.6.0</pluginToolsVersion>\n\n        <goalPrefix>protobuf</goalPrefix>\n    </properties>\n\n    <prerequisites>\n        <maven>${mavenVersion}</maven>\n    </prerequisites>\n\n    <organization>\n        <name>Maven Protocol Buffers Plugin Authors</name>\n        <url>https://github.com/xolstice/protobuf-maven-plugin/blob/master/AUTHORS</url>\n    </organization>\n\n    <licenses>\n        <license>\n            <name>Apache License, Version 2.0</name>\n            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>\n            <distribution>repo</distribution>\n        </license>\n    </licenses>\n\n    <developers>\n        <developer>\n            <id>sergei-ivanov</id>\n            <name>Sergei Ivanov</name>\n            <email>sergei@xolstice.org</email>\n            <url>https://github.com/sergei-ivanov</url>\n            <organization>Xolstice Ltd.</organization>\n            <organizationUrl>https://www.xolstice.org</organizationUrl>\n            <timezone>0</timezone>\n        </developer>\n    </developers>\n\n    <scm>\n        <url>https://github.com/xolstice/protobuf-maven-plugin</url>\n        <connection>scm:git:git://github.com/xolstice/protobuf-maven-plugin.git</connection>\n        <developerConnection>scm:git:ssh://git@github.com/xolstice/protobuf-maven-plugin.git</developerConnection>\n        <tag>HEAD</tag>\n    </scm>\n\n    <distributionManagement>\n        <downloadUrl>https://bintray.com/xolstice/maven/protobuf-maven-plugin/view</downloadUrl>\n        <site>\n            <!--\n                release:perform checks this element to determine whether site-deploy goal needs to be run.\n                The actual site deployment is done by GitHub site-maven-plugin, so the URL here is not used.\n            -->\n            <id>gh-pages</id>\n            <url>https://github.com/xolstice/protobuf-maven-plugin/tree/gh-pages</url>\n        </site>\n        <repository>\n            <id>bintray</id>\n            <name>Releases on Bintray</name>\n            <url>https://api.bintray.com/maven/xolstice/maven/protobuf-maven-plugin</url>\n        </repository>\n    </distributionManagement>\n\n    <issueManagement>\n        <system>Github</system>\n        <url>https://github.com/xolstice/protobuf-maven-plugin/issues/</url>\n    </issueManagement>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-clean-plugin</artifactId>\n                    <version>3.1.0</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-enforcer-plugin</artifactId>\n                    <version>3.0.0-M3</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-toolchains-plugin</artifactId>\n                    <version>3.0.0</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-plugin-plugin</artifactId>\n                    <version>3.6.0</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-component-metadata</artifactId>\n                    <version>${plexusComponentVersion}</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-resources-plugin</artifactId>\n                    <version>3.1.0</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-compiler-plugin</artifactId>\n                    <version>3.8.1</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-surefire-plugin</artifactId>\n                    <version>3.0.0-M4</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-dependency-plugin</artifactId>\n                    <version>3.1.1</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.codehaus.mojo</groupId>\n                    <artifactId>versions-maven-plugin</artifactId>\n                    <version>2.7</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-jar-plugin</artifactId>\n                    <version>3.2.0</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-source-plugin</artifactId>\n                    <version>3.2.1</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-javadoc-plugin</artifactId>\n                    <version>3.1.1</version>\n                    <configuration>\n                        <minmemory>128m</minmemory>\n                        <maxmemory>512m</maxmemory>\n                        <detectLinks>true</detectLinks>\n                        <show>package</show>\n                        <notimestamp>true</notimestamp>\n                    </configuration>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-site-plugin</artifactId>\n                    <version>3.8.2</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>com.github.github</groupId>\n                    <artifactId>site-maven-plugin</artifactId>\n                    <version>0.12</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-install-plugin</artifactId>\n                    <version>3.0.0-M1</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-release-plugin</artifactId>\n                    <version>3.0.0-M1</version>\n                </plugin>\n\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-deploy-plugin</artifactId>\n                    <version>3.0.0-M1</version>\n                </plugin>\n\n            </plugins>\n        </pluginManagement>\n\n        <plugins>\n\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-enforcer-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>enforce-build-environment</id>\n                        <goals>\n                            <goal>enforce</goal>\n                        </goals>\n                        <configuration>\n                            <rules>\n                                <requireMavenVersion>\n                                    <version>[${mavenVersion},)</version>\n                                </requireMavenVersion>\n                                <requireJavaVersion>\n                                    <version>[${java.sdk.version},)</version>\n                                </requireJavaVersion>\n                            </rules>\n                            <fail>true</fail>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>enforce-dependency-convergence</id>\n                        <!--\n                            Postpone the check until the verification phase in the lifecycle,\n                            in order to guarantee resolution of all dependencies,\n                            and to reduce the amount of logging in the early phases.\n                        -->\n                        <phase>verify</phase>\n                        <goals>\n                            <goal>enforce</goal>\n                        </goals>\n                        <configuration>\n                            <rules>\n                                <dependencyConvergence>\n                                    <!--\n                                        Make sure all direct and transitive dependencies\n                                        converge to the same versions\n                                    -->\n                                </dependencyConvergence>\n                            </rules>\n                            <!-- Generate warnings only -->\n                            <fail>false</fail>\n                        </configuration>\n                    </execution>\n                    <execution>\n                        <id>enforce-latest-dependency-versions</id>\n                        <!--\n                            Postpone the check until the verification phase in the lifecycle,\n                            in order to guarantee resolution of all dependencies,\n                            and to reduce the amount of logging in the early phases.\n                        -->\n                        <phase>verify</phase>\n                        <goals>\n                            <goal>enforce</goal>\n                        </goals>\n                        <configuration>\n                            <rules>\n                                <requireUpperBoundDeps>\n                                    <!--\n                                        Make sure that the latest of available dependency versions is selected\n                                    -->\n                                </requireUpperBoundDeps>\n                            </rules>\n                            <!-- Generate warnings only -->\n                            <fail>false</fail>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-toolchains-plugin</artifactId>\n                <inherited>true</inherited>\n                <executions>\n                    <execution>\n                        <id>default-toolchain</id>\n                        <phase>validate</phase>\n                        <goals>\n                            <goal>toolchain</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <toolchains>\n                        <jdk>\n                            <version>[${java.sdk.version},)</version>\n                        </jdk>\n                    </toolchains>\n                </configuration>\n            </plugin>\n\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-plugin-plugin</artifactId>\n                <configuration>\n                    <mojoDependencies />\n                    <goalPrefix>${goalPrefix}</goalPrefix>\n                </configuration>\n                <executions>\n                    <execution>\n                        <id>default-descriptor</id>\n                        <phase>process-classes</phase>\n                        <goals>\n                            <goal>descriptor</goal>\n                        </goals>\n                    </execution>\n                    <execution>\n                        <id>generate-helpmojo</id>\n                        <goals>\n                            <goal>helpmojo</goal>\n                        </goals>\n                        <configuration>\n                            <helpPackageName>org.xolstice.maven.plugin.protobuf</helpPackageName>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n\n            <plugin>\n                <groupId>org.codehaus.plexus</groupId>\n                <artifactId>plexus-component-metadata</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>generate-metadata</goal>\n                            <goal>generate-test-metadata</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <configuration>\n                    <fork>true</fork>\n                    <compilerVersion>${java.compiler.compilerVersion}</compilerVersion>\n                    <source>${java.compiler.source}</source>\n                    <target>${java.compiler.target}</target>\n                    <showDeprecation>true</showDeprecation>\n                    <showWarnings>true</showWarnings>\n                    <compilerArgument>-Xlint:all</compilerArgument>\n                    <testCompilerArgument>-Xlint:all</testCompilerArgument>\n                </configuration>\n            </plugin>\n\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-release-plugin</artifactId>\n                <!-- Override the default release settings from the Super-POM -->\n                <configuration>\n                    <!-- Suppress the default release profile from Maven Super-POM -->\n                    <useReleaseProfile>false</useReleaseProfile>\n                    <!-- Release profile that will be activated by release:perform -->\n                    <releaseProfiles>release</releaseProfiles>\n                    <!-- Enforce integration tests during both release:prepare and release:perform -->\n                    <arguments>-P run-its</arguments>\n                    <!-- Not used in this project, but included for completeness -->\n                    <autoVersionSubmodules>true</autoVersionSubmodules>\n                </configuration>\n            </plugin>\n\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>versions-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <phase>verify</phase>\n                        <goals>\n                            <goal>display-dependency-updates</goal>\n                            <goal>display-plugin-updates</goal>\n                            <goal>display-property-updates</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-dependency-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <!--  Output the resolved tree of dependencies at the end of the build lifecycle -->\n                        <id>display-dependency-tree</id>\n                        <phase>verify</phase>\n                        <goals>\n                            <goal>tree</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-site-plugin</artifactId>\n                <configuration>\n                    <skipDeploy>true</skipDeploy>\n                </configuration>\n            </plugin>\n\n            <plugin>\n                <groupId>com.github.github</groupId>\n                <artifactId>site-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>github-site</id>\n                        <goals>\n                            <goal>site</goal>\n                        </goals>\n                        <phase>site-deploy</phase>\n                        <configuration>\n                            <message>Create website for ${project.artifactId}-${project.version}</message>\n                            <merge>false</merge>\n                            <noJekyll>true</noJekyll>\n                            <server>github</server>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <reporting>\n        <plugins>\n\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-project-info-reports-plugin</artifactId>\n                <version>3.0.0</version>\n                <configuration>\n                    <dependencyDetailsEnabled>false</dependencyDetailsEnabled>\n                </configuration>\n            </plugin>\n\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-plugin-plugin</artifactId>\n                <version>3.6.0</version>\n                <configuration>\n                    <mojoDependencies />\n                    <goalPrefix>${goalPrefix}</goalPrefix>\n                </configuration>\n            </plugin>\n\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-javadoc-plugin</artifactId>\n                <version>3.1.1</version>\n                <configuration>\n                    <minmemory>128m</minmemory>\n                    <maxmemory>512m</maxmemory>\n                    <detectLinks>true</detectLinks>\n                    <show>package</show>\n                    <notimestamp>true</notimestamp>\n                </configuration>\n                <reportSets>\n                    <reportSet>\n                        <reports>\n                            <report>javadoc-no-fork</report>\n                        </reports>\n                    </reportSet>\n                </reportSets>\n            </plugin>\n\n            <!--\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jxr-plugin</artifactId>\n                <version>2.3</version>\n            </plugin>\n            -->\n\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>versions-maven-plugin</artifactId>\n                <version>2.7</version>\n                <reportSets>\n                    <reportSet>\n                        <reports>\n                            <report>dependency-updates-report</report>\n                            <report>plugin-updates-report</report>\n                            <report>property-updates-report</report>\n                        </reports>\n                    </reportSet>\n                </reportSets>\n            </plugin>\n\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-changes-plugin</artifactId>\n                <version>2.12.1</version>\n                <reportSets>\n                    <reportSet>\n                        <reports>\n                            <report>changes-report</report>\n                        </reports>\n                    </reportSet>\n                </reportSets>\n            </plugin>\n\n        </plugins>\n    </reporting>\n\n    <profiles>\n        <profile>\n            <!--\n                A separate profile to optionally enable integration tests\n                (beware that they can be very time and resource-consuming).\n                It is forcibly activated when running the release goals.\n            -->\n            <id>run-its</id>\n            <build>\n                <plugins>\n\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-invoker-plugin</artifactId>\n                        <version>3.2.1</version>\n                        <configuration>\n                            <debug>false</debug>\n                            <projectsDirectory>src/it</projectsDirectory>\n                            <pomIncludes>\n                                <pomInclude>*/pom.xml</pomInclude>\n                            </pomIncludes>\n                            <pomExcludes>\n                                <pomExclude>dependencies/pom.xml</pomExclude>\n                            </pomExcludes>\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                            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>\n                            <properties>\n                                <execProps>fromExecProps</execProps>\n                            </properties>\n                        </configuration>\n                        <executions>\n                            <execution>\n                                <id>integration-test</id>\n                                <goals>\n                                    <goal>install</goal>\n                                    <goal>run</goal>\n                                </goals>\n                            </execution>\n                        </executions>\n                    </plugin>\n\n                </plugins>\n            </build>\n\n            <reporting>\n                <plugins>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-invoker-plugin</artifactId>\n                        <version>3.2.1</version>\n                    </plugin>\n                </plugins>\n            </reporting>\n        </profile>\n\n        <profile>\n            <!--\n               A separate set of executions to be performed when running the release goals.\n           -->\n            <id>release</id>\n            <build>\n                <plugins>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-source-plugin</artifactId>\n                        <executions>\n                            <execution>\n                                <id>attach-sources</id>\n                                <goals>\n                                    <goal>jar-no-fork</goal>\n                                </goals>\n                            </execution>\n                        </executions>\n                    </plugin>\n                    <plugin>\n                        <groupId>org.apache.maven.plugins</groupId>\n                        <artifactId>maven-javadoc-plugin</artifactId>\n                        <executions>\n                            <execution>\n                                <id>attach-javadocs</id>\n                                <goals>\n                                    <goal>jar</goal>\n                                </goals>\n                            </execution>\n                        </executions>\n                    </plugin>\n                </plugins>\n            </build>\n        </profile>\n    </profiles>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-plugin-api</artifactId>\n            <version>${mavenVersion}</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-component-annotations</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven.plugin-tools</groupId>\n            <artifactId>maven-plugin-annotations</artifactId>\n            <version>${pluginToolsVersion}</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.apache.maven</groupId>\n                    <artifactId>maven-artifact</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.codehaus.plexus</groupId>\n            <artifactId>plexus-utils</artifactId>\n            <version>${plexusUtilsVersion}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.codehaus.plexus</groupId>\n            <artifactId>plexus-component-annotations</artifactId>\n            <version>${plexusComponentVersion}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.sonatype.plexus</groupId>\n            <artifactId>plexus-build-api</artifactId>\n            <version>0.0.7</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-core</artifactId>\n            <version>${mavenVersion}</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-component-annotations</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>com.google.guava</groupId>\n                    <artifactId>guava</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-artifact</artifactId>\n            <version>${mavenVersion}</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.maven</groupId>\n            <artifactId>maven-compat</artifactId>\n            <version>${mavenVersion}</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-component-annotations</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>org.codehaus.plexus</groupId>\n                    <artifactId>plexus-utils</artifactId>\n                </exclusion>\n                <exclusion>\n                    <groupId>com.google.guava</groupId>\n                    <artifactId>guava</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/changes/changes.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2020 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<document xmlns=\"http://maven.apache.org/changes/1.0.0\"\n          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:schemaLocation=\"http://maven.apache.org/changes/1.0.0\n                              http://maven.apache.org/xsd/changes-1.0.0.xsd\">\n\n    <body>\n\n        <release version=\"0.7.0\" date=\"Pending\" description=\"TBD\">\n            <action dev=\"sergei-ivanov\" type=\"fix\" issue=\"72\" due-to=\"Laurent Goujon (laurentgo)\">\n                Fix file descriptor leak.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"64\" due-to=\"Julien Henry (henryju)\">\n                Support passing options to the Java compiler.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\" issue=\"57\" due-to=\"David Reichert (davidmreichert)\">\n                Allowed more flexibility in specifying input proto files.\n                Versioned file extensions (e.g. .proto2, .proto3) can be used.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\" issue=\"54\">\n                Removed common goal properties and logic for generating descriptor sets.\n                Instead, two additional goals were introduced for descriptor set generation.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"remove\" issue=\"52\">\n                Removed support for JavaNano generator.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"53\">\n                Provided origin information for WinRun4J binaries.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\" issue=\"51\" due-to=\"Cosmin Lehene (clehene)\">\n                Use pb instead of protobin as file extension for binary descriptors.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\" issue=\"48\">\n                Set clearOutputDirectory parameter to false by default.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\" issue=\"49\">\n                Java 1.8 and Maven 3.3.9 are now minimum required versions for running the plugin.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\" issue=\"47\" due-to=\"Cosmin Lehene (clehene)\">\n                More detailed error message.\n            </action>\n        </release>\n\n        <release version=\"0.6.1\" date=\"2018-10-01\" description=\"Additional protoc options\">\n            <action dev=\"sergei-ivanov\" type=\"update\" issue=\"43\">\n                Address vulnerabilities reported by Snyk.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"5\" due-to=\"Chris Heisterkamp (cheister)\">\n                Add useArgumentFile option to help with \"Command line is too long\" error.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\">\n                Added CI configurations.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"1\">\n                Added new goals to generate C# sources from protobuf definitions.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"4\">\n                Added new goals to generate JavaScript sources from protobuf definitions.\n            </action>\n        </release>\n\n        <release version=\"0.5.0\" date=\"2016-01-28\" description=\"Rebranding\">\n            <action dev=\"sergei-ivanov\" type=\"add\">\n                Added licence and copyright information and prepared for the first release into Maven Central.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\">\n                Renamed project coordinates and java packages.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"remove\">\n                Obsolete goal 'testCompile' has been removed.\n            </action>\n        </release>\n\n        <release version=\"0.4.4\" date=\"2015-12-21\" description=\"Additional protoc options\">\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"39\" due-to=\"Alexander Torstling (atorstling)\">\n                Added support for including source info in descriptor sets.\n            </action>\n        </release>\n\n        <release version=\"0.4.3\" date=\"2015-09-20\" description=\"Support for JavaNano, minor changes\">\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"38\" due-to=\"Marek Kedzierski (kedzie)\">\n                Added support for JavaNano generator (requires protobuf compiler version 3 or above).\n            </action>\n        </release>\n\n        <release version=\"0.4.2\" date=\"2015-04-29\" description=\"Bug fixes\">\n            <action dev=\"sergei-ivanov\" type=\"fix\" issue=\"34\">\n                Made the order of imports predictable and matching the order of dependencies.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"fix\">\n                Fixed release configuration.\n            </action>\n        </release>\n\n        <release version=\"0.4.1\" date=\"2015-04-27\" description=\"Support for native protoc plugins\">\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"33\">\n                Added an option to download protoc binary artifact from Maven repo.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"21\">\n                Generated descriptor set can be attached to the build.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"30\">\n                Added new goals to use custom native protoc plugins.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"32\">\n                Added new parameter 'attachProtoSources', which controls whether the source protobuf files\n                are attached to the build and included into the final artifact.\n            </action>\n        </release>\n\n        <release version=\"0.4.0\" date=\"2015-03-11\" description=\"Support for C++ and Python, Java 6, Maven 3\">\n            <action dev=\"sergei-ivanov\" type=\"fix\" issue=\"25\">\n                Fixed toolchain support that was broken by incompatible changes in Maven 3.2.5.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\" issue=\"27\">\n                Maven 3.0 is now a minimum required version for running the plugin.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\" issue=\"26\">\n                Java 1.6 is now a minimum required version for running the plugin.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"19\" due-to=\"abatalev\">\n                A new option to suppress clearing of the output directory.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\" issue=\"5\">\n                Added new goals to generate C++ and Python sources from protobuf definitions.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\">\n                Goal 'testCompile' has been renamed into 'test-compile'\n                (the old goal still remains for backward compatibility).\n            </action>\n        </release>\n\n        <release version=\"0.3.2\" date=\"2013-10-21\" description=\"Compatibility with Maven 3.1.x\">\n            <action dev=\"sergei-ivanov\" type=\"fix\">\n                Removed direct dependency on Aether library, and used injected Maven components for artifact resolution.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\">\n                Allowed to specify classifier in java protoc plugin definition.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\">\n                Allowed to use version range specifications in java protoc plugin definition.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"remove\">\n                Removed 'scope' parameter from java protoc plugin definition.\n                It has never been used, and any scope other than \"runtime\" is unlikely to work correctly.\n            </action>\n        </release>\n\n        <release version=\"0.3.1\" date=\"2013-03-05\" description=\"Functional updates\">\n            <action dev=\"rwicke\" type=\"add\">\n                Integration tests for java protoc plugins.\n            </action>\n            <action dev=\"rwicke\" type=\"update\">\n                Support for running java protoc plugins on 64-bit Windows platform.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\" due-to=\"jsilland\">\n                Fixed integration into Eclipse lifecycle (library version conflict)\n            </action>\n        </release>\n\n        <release version=\"0.3.0\" date=\"2013-01-04\" description=\"New features\">\n            <action dev=\"rwicke\" type=\"add\">\n                Support for java-based plugins for protoc compiler.\n            </action>\n            <action dev=\"rwicke\" type=\"add\">\n                Generation of binary descriptor sets.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\">\n                Upgraded required Maven version to 2.2.1.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"update\">\n                Updated to the latest versions of Maven plugins.\n                Switched to using Java 5 Mojo annotations for plugin metadata.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\" due-to=\"Igor Petruk\">\n                Integration into Eclipse lifecycle (supported by M2E 1.1 and later)\n            </action>\n        </release>\n\n        <release version=\"0.2.0\" date=\"2011-12-12\" description=\"Bug fixes and new features\">\n            <action dev=\"sergei-ivanov\" type=\"add\">\n                Added protobuf toolchain extension for use by maven-toolchains-plugin.\n                Integrated protobuf toolchain into plugin execution.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\">\n                Additional debug logging is produced when Maven runs in verbose mode.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\">\n                Added a suite of integration tests.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\">\n                Created content for the Maven-generated web site.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"fix\">\n                Updated documentation in source code.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"fix\">\n                Updated Mojo documentation.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"fix\">\n                Updated Mojo annotations for Maven3 (marked plugin as thread-safe for parallel module builds).\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\">\n                Allowed protoc executable to be specified when invoking plugin from command line.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"add\">\n                Added options to suppress plugin execution.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"fix\" due-to=\"B. K. Oxley (binkley)\">\n                Enabled test protobuf definitions to import production definitions from the same module.\n            </action>\n            <action dev=\"sergei-ivanov\" type=\"fix\" due-to=\"Paul Nyheim (pnyheim)\">\n                Fixed importing protobuf definitions from other projects or modules when namespaces are used.\n            </action>\n        </release>\n\n    </body>\n</document>\n"
  },
  {
    "path": "src/it/TEST-1/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protoc location is picked up from 'protobuf' tool chain, \\\n  and proto compilation completes successfully.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean compile\n"
  },
  {
    "path": "src/it/TEST-1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-1</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 1</name>\n\n    <properties>\n        <protobufVersion>[3.4.0,3.5.0)</protobufVersion>\n    </properties>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-toolchains-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>protobuf-toolchain</id>\n                        <phase>validate</phase>\n                        <goals>\n                            <goal>toolchain</goal>\n                        </goals>\n                        <configuration>\n                            <toolchains>\n                                <protobuf>\n                                    <version>${protobufVersion}</version>\n                                </protobuf>\n                            </toolchains>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <extensions>true</extensions>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-1/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-1/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'test/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package test');\nassert content.contains('class Test');\nassert content.contains('class TestMessage');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-10/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protobuf definitions can be imported from other modules in the reactor. \\\n  In this test, imports are scoped to the default package.\n\ninvoker.goals = clean compile\n"
  },
  {
    "path": "src/it/TEST-10/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-10-parent</artifactId>\n    <version>1.0.0</version>\n    <packaging>pom</packaging>\n\n    <name>Integration Test 10 (Parent)</name>\n\n    <modules>\n        <module>project1</module>\n        <module>project2</module>\n    </modules>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.xolstice.maven.plugins</groupId>\n                    <artifactId>protobuf-maven-plugin</artifactId>\n                    <version>@project.version@</version>\n                    <configuration>\n                        <protocArtifact>\n                            com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                        </protocArtifact>\n                    </configuration>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-10/project1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-10-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-10-project1</artifactId>\n\n    <name>Integration Test 10 (1)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-10/project1/src/main/proto/test1.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n}\n"
  },
  {
    "path": "src/it/TEST-10/project2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-10-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-10-project2</artifactId>\n\n    <name>Integration Test 10 (2)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>${project.groupId}</groupId>\n            <artifactId>test-10-project1</artifactId>\n            <version>1.0.0</version>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/TEST-10/project2/src/main/proto/test2.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\nimport \"test1.proto\";\n\noption java_package = \"it.project2.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage2 {\n    TestMessage1 included = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-10/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'project1/target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project1/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project1.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage1');\n\noutputDirectory = new File(basedir, 'project2/target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project2/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project2.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage2');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-11/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protobuf definitions can be imported from other modules in the reactor. \\\n  The dependency has type of 'test-jar' (test protobuf files import \\\n  test protobuf files from another module). \\\n  In this test, imports are scoped to packages. \\\n  We need to make sure that package structure for protobuf definitions \\\n  is preserved in packaged jars, and correctly restored for importing.\n\ninvoker.goals = clean test-compile\n"
  },
  {
    "path": "src/it/TEST-11/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-11-parent</artifactId>\n    <version>1.0.0</version>\n    <packaging>pom</packaging>\n\n    <name>Integration Test 11 (Parent)</name>\n\n    <modules>\n        <module>project1</module>\n        <module>project2</module>\n    </modules>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.xolstice.maven.plugins</groupId>\n                    <artifactId>protobuf-maven-plugin</artifactId>\n                    <version>@project.version@</version>\n                    <configuration>\n                        <protocArtifact>\n                            com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                        </protocArtifact>\n                    </configuration>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-11/project1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-11-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-11-project1</artifactId>\n\n    <name>Integration Test 11 (1)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile</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                        <goals>\n                            <goal>test-jar</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-11/project1/src/test/proto/it/project1/test1.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage it.project1;\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n}\n"
  },
  {
    "path": "src/it/TEST-11/project2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-11-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-11-project2</artifactId>\n\n    <name>Integration Test 11 (2)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>${project.groupId}</groupId>\n            <artifactId>test-11-project1</artifactId>\n            <version>1.0.0</version>\n            <type>test-jar</type>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/TEST-11/project2/src/test/proto/it/project2/test2.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage it.project2;\n\nimport \"it/project1/test1.proto\";\n\noption java_package = \"it.project2.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage2 {\n    it.project1.TestMessage1 included = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-11/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'project1/target/generated-test-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project1/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project1.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage1');\n\noutputDirectory = new File(basedir, 'project2/target/generated-test-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project2/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project2.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage2');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-12/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protobuf definitions can be imported from other modules in the reactor. \\\n  In this test, imports are scoped to the default package.\n\ninvoker.goals = clean test-compile\n"
  },
  {
    "path": "src/it/TEST-12/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-12-parent</artifactId>\n    <version>1.0.0</version>\n    <packaging>pom</packaging>\n\n    <name>Integration Test 12 (Parent)</name>\n\n    <modules>\n        <module>project1</module>\n        <module>project2</module>\n    </modules>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.xolstice.maven.plugins</groupId>\n                    <artifactId>protobuf-maven-plugin</artifactId>\n                    <version>@project.version@</version>\n                    <configuration>\n                        <protocArtifact>\n                            com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                        </protocArtifact>\n                    </configuration>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-12/project1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-12-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-12-project1</artifactId>\n\n    <name>Integration Test 12 (1)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile</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                        <goals>\n                            <goal>test-jar</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-12/project1/src/test/proto/test1.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n}\n"
  },
  {
    "path": "src/it/TEST-12/project2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-12-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-12-project2</artifactId>\n\n    <name>Integration Test 12 (2)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>${project.groupId}</groupId>\n            <artifactId>test-12-project1</artifactId>\n            <version>1.0.0</version>\n            <type>test-jar</type>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/TEST-12/project2/src/test/proto/test2.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\nimport \"test1.proto\";\n\noption java_package = \"it.project2.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage2 {\n    TestMessage1 included = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-12/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'project1/target/generated-test-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project1/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project1.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage1');\n\noutputDirectory = new File(basedir, 'project2/target/generated-test-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project2/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project2.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage2');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-13/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that production protobuf definitions can be imported into test protobuf definitions \\\n  within the same module. \\\n  In this test, imports are scoped to packages. \\\n  We need to make sure that package structure for protobuf definitions \\\n  is correctly handled by the plugin.\n\ninvoker.goals = clean test-compile\n"
  },
  {
    "path": "src/it/TEST-13/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-13</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 13</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                            <goal>test-compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-13/src/main/proto/it/project1/test1.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage it.project1;\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos1\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n}\n"
  },
  {
    "path": "src/it/TEST-13/src/test/proto/it/project1/test2.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage it.project1;\n\nimport \"it/project1/test1.proto\";\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos2\";\noption optimize_for = SPEED;\n\nmessage TestMessage2 {\n    it.project1.TestMessage1 included = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-13/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project1/messages/TestProtos1.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project1.messages');\nassert content.contains('class TestProtos1');\nassert content.contains('class TestMessage1');\n\noutputDirectory = new File(basedir, 'target/generated-test-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project1/messages/TestProtos2.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project1.messages');\nassert content.contains('class TestProtos2');\nassert content.contains('class TestMessage2');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-14/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that production protobuf definitions can be imported into test protobuf definitions \\\n  within the same module. \\\n  In this test, imports are scoped to the default package.\n\ninvoker.goals = clean test-compile\n"
  },
  {
    "path": "src/it/TEST-14/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-14</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 14</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                            <goal>test-compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-14/src/main/proto/test1.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos1\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n}\n"
  },
  {
    "path": "src/it/TEST-14/src/test/proto/test2.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\nimport \"test1.proto\";\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos2\";\noption optimize_for = SPEED;\n\nmessage TestMessage2 {\n    TestMessage1 included = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-14/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project1/messages/TestProtos1.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project1.messages');\nassert content.contains('class TestProtos1');\nassert content.contains('class TestMessage1');\n\noutputDirectory = new File(basedir, 'target/generated-test-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project1/messages/TestProtos2.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project1.messages');\nassert content.contains('class TestProtos2');\nassert content.contains('class TestMessage2');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-15/invoker.properties",
    "content": "#\n# Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that a protobuf file descriptor set is written in the expected location.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean generate-resources\n"
  },
  {
    "path": "src/it/TEST-15/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-15</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 15</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile-descriptor-set</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-15/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-15/verify.groovy",
    "content": "/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-resources/protobuf/descriptor-sets')\nassert outputDirectory.exists()\nassert outputDirectory.isDirectory()\n\ngeneratedDescriptorFile = new File(outputDirectory, 'test-15-1.0.0.pb')\nassert generatedDescriptorFile.exists()\nassert generatedDescriptorFile.isFile()\n\nreturn true\n"
  },
  {
    "path": "src/it/TEST-16/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that a custom protoc plugin is invoked\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean compile\n\n#invoker.mavenOpts = -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005\n"
  },
  {
    "path": "src/it/TEST-16/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-16</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 16</name>\n\n    <properties>\n        <!-- Peg to the same protobuf version as MinimalPlugin was compiled against -->\n        <protobufVersion>3.4.0</protobufVersion>\n    </properties>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <id>custom-protoc-generate</id>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                        <configuration>\n                            <protocPlugins>\n                                <protocPlugin>\n                                    <id>minimal</id>\n                                    <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n                                    <artifactId>test-protoc-plugin</artifactId>\n                                    <version>1.0.5</version>\n                                    <mainClass>org.xolstice.protobuf.plugin.minimal.MinimalPlugin</mainClass>\n                                </protocPlugin>\n                                <protocPlugin>\n                                    <id>prefix</id>\n                                    <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n                                    <artifactId>test-protoc-plugin</artifactId>\n                                    <!-- Test that version ranges are correctly resolved too -->\n                                    <version>[1.0.0,1.1.0)</version>\n                                    <mainClass>org.xolstice.protobuf.plugin.minimal.MinimalPlugin</mainClass>\n                                    <args>\n                                        <arg>prefix-</arg>\n                                    </args>\n                                </protocPlugin>\n                            </protocPlugins>\n                        </configuration>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-16/src/main/proto/test1.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test1\";\noption java_outer_classname = \"Test1Protos\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-16/src/main/proto/test2.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test2\";\noption java_outer_classname = \"Test2Protos\";\noption optimize_for = SPEED;\n\nmessage TestMessage2 {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-16/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\ndef assertGeneratedFile(outputDirectory, fname, content) {\n    genFile = new File(outputDirectory, fname)\n    assert genFile.exists()\n    assert genFile.isFile()\n    assert genFile.text == content\n}\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/java')\nassert outputDirectory.exists()\nassert outputDirectory.isDirectory()\n\nassertGeneratedFile(outputDirectory, 'test1.txt', 'test1.proto')\nassertGeneratedFile(outputDirectory, 'prefix-test1.txt', 'test1.proto')\nassertGeneratedFile(outputDirectory, 'test2.txt', 'test2.proto')\nassertGeneratedFile(outputDirectory, 'prefix-test2.txt', 'test2.proto')\n\nreturn true\n"
  },
  {
    "path": "src/it/TEST-17/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that the execution fails if the artifact for java protoc plugin cannot be resolved.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean compile\n\n# The expected result of the build, possible values are \"success\" (default) and \"failure\"\ninvoker.buildResult = failure\n"
  },
  {
    "path": "src/it/TEST-17/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-17</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 17</name>\n\n    <properties>\n        <!-- Peg to the same protobuf version as MinimalPlugin was compiled against -->\n        <protobufVersion>3.4.0</protobufVersion>\n    </properties>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <id>custom-protoc-generate</id>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                        <configuration>\n                            <protocPlugins>\n                                <protocPlugin>\n                                    <id>missing</id>\n                                    <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n                                    <artifactId>test-protoc-plugin</artifactId>\n                                    <!-- This is a knowingly non-existent version -->\n                                    <version>2.0.0</version>\n                                    <mainClass>org.xolstice.protobuf.plugin.minimal.MinimalPlugin</mainClass>\n                                </protocPlugin>\n                            </protocPlugins>\n                        </configuration>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-17/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-18/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protoc location is picked up from 'protobuf' tool chain, \\\n  and proto compilation into Python completes successfully.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean compile\n"
  },
  {
    "path": "src/it/TEST-18/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-18</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 18</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile-python</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-18/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-18/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/python');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedPythonFile = new File(outputDirectory, 'test_pb2.py');\nassert generatedPythonFile.exists();\nassert generatedPythonFile.isFile();\n\ncontent = generatedPythonFile.text;\nassert content.contains('TestMessage');\nassert content.contains('NestedMessage');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-19/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protoc location is picked up from 'protobuf' tool chain, \\\n  and test proto compilation into Python completes successfully.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean test-compile\n"
  },
  {
    "path": "src/it/TEST-19/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-19</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 19</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile-python</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-19/src/test/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-19/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-test-sources/protobuf/python');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedPythonFile = new File(outputDirectory, 'test_pb2.py');\nassert generatedPythonFile.exists();\nassert generatedPythonFile.isFile();\n\ncontent = generatedPythonFile.text;\nassert content.contains('TestMessage');\nassert content.contains('NestedMessage');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-2/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that the custom 'protobuf' tool chain is picked up by maven-toolchains-plugin \\\n  as long as protobuf-maven-plugin registers its extensions with maven build. \\\n  No executions for protobuf-maven-plugin itself are defined in the test pom.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean validate\n"
  },
  {
    "path": "src/it/TEST-2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-2</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 2</name>\n\n    <properties>\n        <protobufVersion>[3.4.0,3.5.0)</protobufVersion>\n    </properties>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-toolchains-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>protobuf-toolchain</id>\n                        <phase>validate</phase>\n                        <goals>\n                            <goal>toolchain</goal>\n                        </goals>\n                        <configuration>\n                            <toolchains>\n                                <protobuf>\n                                    <version>${protobufVersion}</version>\n                                </protobuf>\n                            </toolchains>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <extensions>true</extensions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-2/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nbuildLogFile = new File(basedir, 'build.log');\nassert buildLogFile.exists();\nassert buildLogFile.isFile();\n\ncontent = buildLogFile.text;\nassert content.contains('Found matching toolchain for type protobuf: PROTOC');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-20/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protoc location is picked up from 'protobuf' tool chain, \\\n  and proto compilation into C++ completes successfully.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean compile\n"
  },
  {
    "path": "src/it/TEST-20/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-20</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 20</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile-cpp</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-20/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-20/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/cpp');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedHeaderFile = new File(outputDirectory, 'test.pb.h');\nassert generatedHeaderFile.exists();\nassert generatedHeaderFile.isFile();\n\ncontent = generatedHeaderFile.text;\nassert content.contains('class TestMessage');\nassert content.contains('class TestMessage_NestedMessage');\nassert content.contains('enum TestMessage_NestedEnum');\n\ngeneratedClassFile = new File(outputDirectory, 'test.pb.cc');\nassert generatedClassFile.exists();\nassert generatedClassFile.isFile();\n\ncontent = generatedClassFile.text;\nassert content.contains('TestMessage::TestMessage()');\nassert content.contains('TestMessage_NestedMessage::TestMessage_NestedMessage()');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-21/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protoc location is picked up from 'protobuf' tool chain, \\\n  and test proto compilation into C++ completes successfully.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean test-compile\n"
  },
  {
    "path": "src/it/TEST-21/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-21</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 21</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile-cpp</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-21/src/test/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-21/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-test-sources/protobuf/cpp');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedHeaderFile = new File(outputDirectory, 'test.pb.h');\nassert generatedHeaderFile.exists();\nassert generatedHeaderFile.isFile();\n\ncontent = generatedHeaderFile.text;\nassert content.contains('class TestMessage');\nassert content.contains('class TestMessage_NestedMessage');\nassert content.contains('enum TestMessage_NestedEnum');\n\ngeneratedClassFile = new File(outputDirectory, 'test.pb.cc');\nassert generatedClassFile.exists();\nassert generatedClassFile.isFile();\n\ncontent = generatedClassFile.text;\nassert content.contains('TestMessage::TestMessage()');\nassert content.contains('TestMessage_NestedMessage::TestMessage_NestedMessage()');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-22/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protoc location is picked up from 'protobuf' tool chain, \\\n  proto compilation into java completes successfully \\\n  and protobuf sources are attached to the build.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean package\n"
  },
  {
    "path": "src/it/TEST-22/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-22</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 22</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                            <goal>test-compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-22/src/main/proto/a/aaa.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage a;\n\noption java_package = \"a\";\noption java_outer_classname = \"AaaProtos\";\noption optimize_for = SPEED;\n\nmessage Aaa {\n  int32 a = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-22/src/test/proto/b/bbb.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage b;\n\noption java_package = \"b\";\noption java_outer_classname = \"BbbProtos\";\noption optimize_for = SPEED;\n\nmessage Bbb {\n  int32 b = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-22/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\ngeneratedJavaFile = new File(basedir, 'target/classes/a/AaaProtos.class');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\nattachedResource = new File(basedir, 'target/classes/a/aaa.proto');\nassert attachedResource.exists();\nassert attachedResource.isFile();\n\ngeneratedJavaTestFile = new File(basedir, 'target/test-classes/b/BbbProtos.class');\nassert generatedJavaTestFile.exists();\nassert generatedJavaTestFile.isFile();\n\nattachedTestResource = new File(basedir, 'target/test-classes/b/bbb.proto');\nassert attachedTestResource.exists();\nassert attachedTestResource.isFile();\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-23/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protoc location is picked up from 'protobuf' tool chain, \\\n  proto compilation into java completes successfully \\\n  and protobuf sources are NOT attached to the build.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean package\n"
  },
  {
    "path": "src/it/TEST-23/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-23</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 23</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                            <goal>test-compile</goal>\n                        </goals>\n                        <configuration>\n                            <attachProtoSources>false</attachProtoSources>\n                        </configuration>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-23/src/main/proto/a/aaa.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage a;\n\noption java_package = \"a\";\noption java_outer_classname = \"AaaProtos\";\noption optimize_for = SPEED;\n\nmessage Aaa {\n  int32 a = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-23/src/test/proto/b/bbb.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage b;\n\noption java_package = \"b\";\noption java_outer_classname = \"BbbProtos\";\noption optimize_for = SPEED;\n\nmessage Bbb {\n  int32 b = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-23/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\ngeneratedJavaFile = new File(basedir, 'target/classes/a/AaaProtos.class');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\nattachedResource = new File(basedir, 'target/classes/a/aaa.proto');\nassert !attachedResource.exists();\n\ngeneratedJavaTestFile = new File(basedir, 'target/test-classes/b/BbbProtos.class');\nassert generatedJavaTestFile.exists();\nassert generatedJavaTestFile.isFile();\n\nattachedTestResource = new File(basedir, 'target/test-classes/b/bbb.proto');\nassert !attachedTestResource.exists();\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-24/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protobuf descriptor set can be attached to the build and resolved in other modules in the reactor.\n\ninvoker.goals = clean install\n"
  },
  {
    "path": "src/it/TEST-24/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-24-parent</artifactId>\n    <version>1.0.0</version>\n    <packaging>pom</packaging>\n\n    <name>Integration Test 24 (Parent)</name>\n\n    <modules>\n        <module>project1</module>\n        <module>project2</module>\n    </modules>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.xolstice.maven.plugins</groupId>\n                    <artifactId>protobuf-maven-plugin</artifactId>\n                    <version>@project.version@</version>\n                    <configuration>\n                        <protocArtifact>\n                            com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                        </protocArtifact>\n                    </configuration>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-24/project1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-24-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-24-project1</artifactId>\n\n    <name>Integration Test 24 (1)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile-descriptor-set</goal>\n                        </goals>\n                        <configuration>\n                            <attach>true</attach>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-24/project1/src/main/proto/it/project1/test1.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage it.project1;\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n}\n"
  },
  {
    "path": "src/it/TEST-24/project2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-24-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-24-project2</artifactId>\n\n    <name>Integration Test 24 (2)</name>\n\n    <build>\n        <extensions>\n            <extension>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n            </extension>\n        </extensions>\n\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-dependency-plugin</artifactId>\n                <version>3.1.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>copy-dependencies</goal>\n                        </goals>\n                        <configuration>\n                            <includeGroupIds>${project.groupId}</includeGroupIds>\n                            <includeArtifactIds>test-24-project1</includeArtifactIds>\n                            <includeTypes>pb</includeTypes>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>${project.groupId}</groupId>\n            <artifactId>test-24-project1</artifactId>\n            <version>1.0.0</version>\n            <type>pb</type>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/TEST-24/verify.groovy",
    "content": "/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'project2/target/dependency')\nassert outputDirectory.exists()\nassert outputDirectory.isDirectory()\n\ngeneratedDescriptorFile = new File(outputDirectory, 'test-24-project1-1.0.0.pb')\nassert generatedDescriptorFile.exists()\nassert generatedDescriptorFile.isFile()\n\nreturn true\n"
  },
  {
    "path": "src/it/TEST-25/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = Verifies that protoc artifact can be downloaded from Maven repository.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean generate-sources\n"
  },
  {
    "path": "src/it/TEST-25/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-25</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 25</name>\n\n    <properties>\n        <protobufVersion>3.4.0</protobufVersion>\n    </properties>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-25/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n}\n"
  },
  {
    "path": "src/it/TEST-25/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'test/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package test');\nassert content.contains('class Test');\nassert content.contains('class TestMessage');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-26/invoker.properties",
    "content": "#\n# Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that a test protobuf file descriptor set is written in the expected location.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean generate-test-resources\n"
  },
  {
    "path": "src/it/TEST-26/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-26</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 26</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile-descriptor-set</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-26/src/test/proto/test.proto",
    "content": "//\n// Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-26/verify.groovy",
    "content": "/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-test-resources/protobuf/descriptor-sets')\nassert outputDirectory.exists()\nassert outputDirectory.isDirectory()\n\ngeneratedDescriptorFile = new File(outputDirectory, 'test-26-1.0.0.pb')\nassert generatedDescriptorFile.exists()\nassert generatedDescriptorFile.isFile()\n\nreturn true\n"
  },
  {
    "path": "src/it/TEST-27/invoker.properties",
    "content": "#\n# Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that a test protobuf descriptor set can be attached to the build and resolved in other modules in the reactor.\n\ninvoker.goals = clean install\n"
  },
  {
    "path": "src/it/TEST-27/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-27-parent</artifactId>\n    <version>1.0.0</version>\n    <packaging>pom</packaging>\n\n    <name>Integration Test 27 (Parent)</name>\n\n    <modules>\n        <module>project1</module>\n        <module>project2</module>\n    </modules>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.xolstice.maven.plugins</groupId>\n                    <artifactId>protobuf-maven-plugin</artifactId>\n                    <version>@project.version@</version>\n                    <configuration>\n                        <protocArtifact>\n                            com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                        </protocArtifact>\n                    </configuration>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-27/project1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-27-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-27-project1</artifactId>\n\n    <name>Integration Test 27 (1)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile-descriptor-set</goal>\n                        </goals>\n                        <configuration>\n                            <attach>true</attach>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-27/project1/src/test/proto/it/project1/test1.proto",
    "content": "//\n// Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage it.project1;\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n}\n"
  },
  {
    "path": "src/it/TEST-27/project2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-27-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-27-project2</artifactId>\n\n    <name>Integration Test 27 (2)</name>\n\n    <build>\n        <extensions>\n            <extension>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n            </extension>\n        </extensions>\n\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-dependency-plugin</artifactId>\n                <version>3.1.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>copy-dependencies</goal>\n                        </goals>\n                        <configuration>\n                            <includeGroupIds>${project.groupId}</includeGroupIds>\n                            <includeArtifactIds>test-27-project1</includeArtifactIds>\n                            <includeTypes>test-pb</includeTypes>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>${project.groupId}</groupId>\n            <artifactId>test-27-project1</artifactId>\n            <version>1.0.0</version>\n            <type>test-pb</type>\n            <classifier>test</classifier>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/TEST-27/verify.groovy",
    "content": "/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'project2/target/dependency')\nassert outputDirectory.exists()\nassert outputDirectory.isDirectory()\n\ngeneratedDescriptorFile = new File(outputDirectory, 'test-27-project1-1.0.0-test.pb')\nassert generatedDescriptorFile.exists()\nassert generatedDescriptorFile.isFile()\n\nreturn true\n"
  },
  {
    "path": "src/it/TEST-28/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = Verifies that a binary artifact for a protoc plugin can be downloaded from Maven repository.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean package\n"
  },
  {
    "path": "src/it/TEST-28/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-28</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 28</name>\n\n    <properties>\n        <grpcVersion>1.7.0</grpcVersion>\n    </properties>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <id>protoc-compile</id>\n                        <phase>generate-sources</phase>\n                        <goals>\n                            <goal>compile</goal>\n                            <goal>compile-custom</goal>\n                        </goals>\n                    </execution>\n                    <execution>\n                        <id>protoc-test-compile</id>\n                        <phase>generate-test-sources</phase>\n                        <goals>\n                            <goal>test-compile</goal>\n                            <goal>test-compile-custom</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                    <pluginId>grpc</pluginId>\n                    <pluginArtifact>\n                        io.grpc:protoc-gen-grpc-java:${grpcVersion}:exe:${os.detected.classifier}\n                    </pluginArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>io.grpc</groupId>\n            <artifactId>grpc-netty</artifactId>\n            <version>${grpcVersion}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.grpc</groupId>\n            <artifactId>grpc-protobuf</artifactId>\n            <version>${grpcVersion}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.grpc</groupId>\n            <artifactId>grpc-stub</artifactId>\n            <version>${grpcVersion}</version>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/TEST-28/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 zz = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 xx = 1;\n  repeated NestedEnum yy = 2;\n}\n\nservice MyService {\n  rpc MyMethod(TestMessage) returns(TestMessage) {}\n}\n"
  },
  {
    "path": "src/it/TEST-28/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'test/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package test');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage');\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/grpc');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'test/MyServiceGrpc.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package test');\nassert content.contains('class MyServiceGrpc');\nassert content.contains('class MyServiceStub');\n\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-29/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = Verifies that protoc can be invoked with an @args file and that unicode file names are properly handled.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean generate-sources\n"
  },
  {
    "path": "src/it/TEST-29/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-29</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 29</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                        <configuration>\n                            <useArgumentFile>true</useArgumentFile>\n                        </configuration>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        <!--  @args files are supported by protoc starting with version 3.5.0 -->\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-29/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n}\n"
  },
  {
    "path": "src/it/TEST-29/src/main/proto/тест.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtosRu\";\noption optimize_for = SPEED;\n\nmessage TestMessageRu {\n}\n"
  },
  {
    "path": "src/it/TEST-29/src/main/proto/テスト.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtosJp\";\noption optimize_for = SPEED;\n\nmessage TestMessageJp {\n}\n"
  },
  {
    "path": "src/it/TEST-29/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'test/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package test');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage');\n\ngeneratedJavaFile = new File(outputDirectory, 'test/TestProtosJp.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package test');\nassert content.contains('class TestProtosJp');\nassert content.contains('class TestMessageJp');\n\ngeneratedJavaFile = new File(outputDirectory, 'test/TestProtosRu.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package test');\nassert content.contains('class TestProtosRu');\nassert content.contains('class TestMessageRu');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-3/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that the custom 'protobuf' tool chain cannot be picked up by maven-toolchains-plugin \\\n  if protobuf-maven-plugin does not register its extensions with maven build.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean validate\n\n# The expected result of the build, possible values are \"success\" (default) and \"failure\"\ninvoker.buildResult = failure\n"
  },
  {
    "path": "src/it/TEST-3/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-3</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 3</name>\n\n    <properties>\n        <protobufVersion>[3.4.0,3.5.0)</protobufVersion>\n    </properties>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-toolchains-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>protobuf-toolchain</id>\n                        <phase>validate</phase>\n                        <goals>\n                            <goal>toolchain</goal>\n                        </goals>\n                        <configuration>\n                            <toolchains>\n                                <protobuf>\n                                    <version>${protobufVersion}</version>\n                                </protobuf>\n                            </toolchains>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-30/invoker.properties",
    "content": "#\n# Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description=\\\n  Verifies that protoc location is picked up from 'protobuf' tool chain, \\\n  and proto compilation into C# completes successfully.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals=clean generate-sources\n"
  },
  {
    "path": "src/it/TEST-30/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-30</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 30</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile-csharp</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-30/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption csharp_namespace = \"Test\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-30/verify.groovy",
    "content": "/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/csharp');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedFile = new File(outputDirectory, 'Test.cs');\nassert generatedFile.exists();\nassert generatedFile.isFile();\n\ncontent = generatedFile.text;\nassert content.contains('TestMessage');\nassert content.contains('NestedMessage');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-31/invoker.properties",
    "content": "#\n# Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description=\\\n  Verifies that protoc location is picked up from 'protobuf' tool chain, \\\n  and test proto compilation into C# completes successfully.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals=clean generate-test-sources\n"
  },
  {
    "path": "src/it/TEST-31/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-31</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 31</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile-csharp</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-31/src/test/proto/test.proto",
    "content": "//\n// Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption csharp_namespace = \"Test\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-31/verify.groovy",
    "content": "/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-test-sources/protobuf/csharp');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedFile = new File(outputDirectory, 'Test.cs');\nassert generatedFile.exists();\nassert generatedFile.isFile();\n\ncontent = generatedFile.text;\nassert content.contains('TestMessage');\nassert content.contains('NestedMessage');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-32/invoker.properties",
    "content": "#\n# Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description=Verifies that JavaScript generation works\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals=clean generate-sources\n"
  },
  {
    "path": "src/it/TEST-32/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-32</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 32</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile-js</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-32/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-32/verify.groovy",
    "content": "/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/js');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedFile = new File(outputDirectory, 'testmessage.js');\nassert generatedFile.exists();\nassert generatedFile.isFile();\n\ncontent = generatedFile.text;\nassert content.contains('TestMessage');\nassert content.contains('NestedMessage');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-33/invoker.properties",
    "content": "#\n# Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description=Verifies that JavaScript generation works, using additional generator options\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals=clean generate-sources\n"
  },
  {
    "path": "src/it/TEST-33/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-33</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 33</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile-js</goal>\n                        </goals>\n                        <configuration>\n                            <javaScriptOptions>import_style=commonjs,binary</javaScriptOptions>\n                        </configuration>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-33/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-33/verify.groovy",
    "content": "/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/js');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedFile = new File(outputDirectory, 'test_pb.js');\nassert generatedFile.exists();\nassert generatedFile.isFile();\n\ncontent = generatedFile.text;\nassert content.contains('TestMessage');\nassert content.contains('NestedMessage');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-34/invoker.properties",
    "content": "#\n# Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description=Verifies that JavaScript generation works for test protos\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals=clean generate-test-sources\n"
  },
  {
    "path": "src/it/TEST-34/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-34</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 34</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile-js</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-34/src/test/proto/test.proto",
    "content": "//\n// Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-34/verify.groovy",
    "content": "/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-test-sources/protobuf/js');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedFile = new File(outputDirectory, 'testmessage.js');\nassert generatedFile.exists();\nassert generatedFile.isFile();\n\ncontent = generatedFile.text;\nassert content.contains('TestMessage');\nassert content.contains('NestedMessage');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-35/invoker.properties",
    "content": "#\n# Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description=Verifies that JavaScript generation works for test protos, using additional generator options\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals=clean generate-test-sources\n"
  },
  {
    "path": "src/it/TEST-35/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-35</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 35</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile-js</goal>\n                        </goals>\n                        <configuration>\n                            <javaScriptOptions>import_style=commonjs,binary</javaScriptOptions>\n                        </configuration>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-35/src/test/proto/test.proto",
    "content": "//\n// Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-35/verify.groovy",
    "content": "/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-test-sources/protobuf/js');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedFile = new File(outputDirectory, 'test_pb.js');\nassert generatedFile.exists();\nassert generatedFile.isFile();\n\ncontent = generatedFile.text;\nassert content.contains('TestMessage');\nassert content.contains('NestedMessage');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-36/invoker.properties",
    "content": "#\n# Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description=Verifies that Java generation works for lite runtime, using additional generator options\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals=clean compile\n"
  },
  {
    "path": "src/it/TEST-36/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-36</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 36</name>\n\n    <properties>\n        <protobufJavaArtifact>protobuf-javalite</protobufJavaArtifact>\n    </properties>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                        <configuration>\n                            <javaOptions>lite</javaOptions>\n                        </configuration>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-36/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-36/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'test/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package test');\nassert content.contains('class Test');\nassert content.contains('class TestMessage');\nassert content.contains('com.google.protobuf.GeneratedMessageLite');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-37/invoker.properties",
    "content": "#\n# Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description=Verifies that Java generation works for test protos and  lite runtime, using additional generator options\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals=clean test-compile\n"
  },
  {
    "path": "src/it/TEST-37/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-37</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 37</name>\n\n    <properties>\n        <protobufJavaArtifact>protobuf-javalite</protobufJavaArtifact>\n    </properties>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile</goal>\n                        </goals>\n                        <configuration>\n                            <javaOptions>lite</javaOptions>\n                        </configuration>\n                    </execution>\n                </executions>\n                <configuration>\n                    <protocArtifact>\n                        com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                    </protocArtifact>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-37/src/test/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n  message NestedMessage {\n    int32 bb = 1;\n  }\n\n  enum NestedEnum {\n    FOO = 0;\n    BAR = 1;\n    BAZ = 2;\n  }\n\n  // Singular\n  int32 optional_int32    =  1;\n}\n"
  },
  {
    "path": "src/it/TEST-37/verify.groovy",
    "content": "/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'target/generated-test-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'test/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package test');\nassert content.contains('class Test');\nassert content.contains('class TestMessage');\nassert content.contains('com.google.protobuf.GeneratedMessageLite');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-4/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = Verifies that protoc location is reverted to default if unspecified.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean generate-sources\n\n# Possible values are \"fail-fast\" (default), \"fail-at-end\" and \"fail-never\"\ninvoker.failureBehavior = fail-never\n"
  },
  {
    "path": "src/it/TEST-4/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-4</artifactId>\n    <version>1.0.0</version>\n\n    <name>Integration Test 4</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <version>@project.version@</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-4/src/main/proto/test.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\noption java_package = \"test\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage {\n}\n"
  },
  {
    "path": "src/it/TEST-4/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nbuildLogFile = new File(basedir, 'build.log');\nassert buildLogFile.exists();\nassert buildLogFile.isFile();\n\ncontent = buildLogFile.text;\nassert content.contains(\"No 'protocExecutable' parameter is configured, using the default: 'protoc'\");\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-5/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protobuf definitions can be imported from dependency jars. \\\n  The dependency has the default type of 'jar' (main protobuf files import \\\n  main protobuf files from another project). \\\n  In this test, imports are scoped to packages. \\\n  We need to make sure that package structure for protobuf definitions \\\n  is preserved in packaged jars, and correctly restored for importing.\n\n# STEP 1\n# Build project1 and install into local repo\ninvoker.profiles.1 = build-project1\ninvoker.goals.1 = clean install\n\n# STEP 2\n# Build project2, which depends on project1\n# This will test unpacking imports from project1 jar file\ninvoker.profiles.2 = build-project2\ninvoker.goals.2 = clean compile\n"
  },
  {
    "path": "src/it/TEST-5/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-5-parent</artifactId>\n    <version>1.0.0</version>\n    <packaging>pom</packaging>\n\n    <name>Integration Test 5 (Parent)</name>\n\n    <profiles>\n        <profile>\n            <id>build-project1</id>\n            <modules>\n                <module>project1</module>\n            </modules>\n        </profile>\n        <profile>\n            <id>build-project2</id>\n            <modules>\n                <module>project2</module>\n            </modules>\n        </profile>\n    </profiles>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.xolstice.maven.plugins</groupId>\n                    <artifactId>protobuf-maven-plugin</artifactId>\n                    <version>@project.version@</version>\n                    <configuration>\n                        <protocArtifact>\n                            com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                        </protocArtifact>\n                    </configuration>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-5/project1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-5-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-5-project1</artifactId>\n\n    <name>Integration Test 5 (1)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-5/project1/src/main/proto/it/project1/test1.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage it.project1;\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n}\n"
  },
  {
    "path": "src/it/TEST-5/project2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-5-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-5-project2</artifactId>\n\n    <name>Integration Test 5 (2)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>${project.groupId}</groupId>\n            <artifactId>test-5-project1</artifactId>\n            <version>1.0.0</version>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/TEST-5/project2/src/main/proto/it/project2/test2.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage it.project2;\n\nimport \"it/project1/test1.proto\";\n\noption java_package = \"it.project2.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage2 {\n    it.project1.TestMessage1 included = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-5/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'project1/target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project1/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project1.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage1');\n\noutputDirectory = new File(basedir, 'project2/target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project2/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project2.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage2');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-6/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protobuf definitions can be imported from dependency jars. \\\n  In this test, imports are scoped to the default package.\n\n# STEP 1\n# Build project1 and install into local repo\ninvoker.profiles.1 = build-project1\ninvoker.goals.1 = clean install\n\n# STEP 2\n# Build project2, which depends on project1\n# This will test unpacking imports from project1 jar file\ninvoker.profiles.2 = build-project2\ninvoker.goals.2 = clean compile\n"
  },
  {
    "path": "src/it/TEST-6/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-6-parent</artifactId>\n    <version>1.0.0</version>\n    <packaging>pom</packaging>\n\n    <name>Integration Test 6 (Parent)</name>\n\n    <profiles>\n        <profile>\n            <id>build-project1</id>\n            <modules>\n                <module>project1</module>\n            </modules>\n        </profile>\n        <profile>\n            <id>build-project2</id>\n            <modules>\n                <module>project2</module>\n            </modules>\n        </profile>\n    </profiles>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.xolstice.maven.plugins</groupId>\n                    <artifactId>protobuf-maven-plugin</artifactId>\n                    <version>@project.version@</version>\n                    <configuration>\n                        <protocArtifact>\n                            com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                        </protocArtifact>\n                    </configuration>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-6/project1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-6-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-6-project1</artifactId>\n\n    <name>Integration Test 6 (1)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-6/project1/src/main/proto/test1.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n}\n"
  },
  {
    "path": "src/it/TEST-6/project2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-6-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-6-project2</artifactId>\n\n    <name>Integration Test 6 (2)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>${project.groupId}</groupId>\n            <artifactId>test-6-project1</artifactId>\n            <version>1.0.0</version>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/TEST-6/project2/src/main/proto/test2.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\nimport \"test1.proto\";\n\noption java_package = \"it.project2.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage2 {\n    TestMessage1 included = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-6/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'project1/target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project1/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project1.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage1');\n\noutputDirectory = new File(basedir, 'project2/target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project2/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project2.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage2');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-7/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protobuf definitions can be imported from dependency jars. \\\n  The dependency has type of 'test-jar' (test protobuf files import \\\n  test protobuf files from another project). \\\n  In this test, imports are scoped to packages. \\\n  We need to make sure that package structure for protobuf definitions \\\n  is preserved in packaged jars, and correctly restored for importing.\n\n# STEP 1\n# Build project1 and install into local repo\ninvoker.profiles.1 = build-project1\ninvoker.goals.1 = clean install\n\n# STEP 2\n# Build project2, which depends on project1\n# This will test unpacking imports from project1 jar file\ninvoker.profiles.2 = build-project2\ninvoker.goals.2 = clean test-compile\n"
  },
  {
    "path": "src/it/TEST-7/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-7-parent</artifactId>\n    <version>1.0.0</version>\n    <packaging>pom</packaging>\n\n    <name>Integration Test 7 (Parent)</name>\n\n    <profiles>\n        <profile>\n            <id>build-project1</id>\n            <modules>\n                <module>project1</module>\n            </modules>\n        </profile>\n        <profile>\n            <id>build-project2</id>\n            <modules>\n                <module>project2</module>\n            </modules>\n        </profile>\n    </profiles>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.xolstice.maven.plugins</groupId>\n                    <artifactId>protobuf-maven-plugin</artifactId>\n                    <version>@project.version@</version>\n                    <configuration>\n                        <protocArtifact>\n                            com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                        </protocArtifact>\n                    </configuration>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-7/project1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-7-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-7-project1</artifactId>\n\n    <name>Integration Test 7 (1)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile</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                        <goals>\n                            <goal>test-jar</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-7/project1/src/test/proto/it/project1/test1.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage it.project1;\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n}\n"
  },
  {
    "path": "src/it/TEST-7/project2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-7-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-7-project2</artifactId>\n\n    <name>Integration Test 7 (2)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>${project.groupId}</groupId>\n            <artifactId>test-7-project1</artifactId>\n            <version>1.0.0</version>\n            <type>test-jar</type>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/TEST-7/project2/src/test/proto/it/project2/test2.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage it.project2;\n\nimport \"it/project1/test1.proto\";\n\noption java_package = \"it.project2.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage2 {\n    it.project1.TestMessage1 included = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-7/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'project1/target/generated-test-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project1/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project1.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage1');\n\noutputDirectory = new File(basedir, 'project2/target/generated-test-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project2/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project2.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage2');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-8/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protobuf definitions can be imported from dependency jars. \\\n  In this test, imports are scoped to the default package.\n\n# STEP 1\n# Build project1 and install into local repo\ninvoker.profiles.1 = build-project1\ninvoker.goals.1 = clean install\n\n# STEP 2\n# Build project2, which depends on project1\n# This will test unpacking imports from project1 jar file\ninvoker.profiles.2 = build-project2\ninvoker.goals.2 = clean test-compile\n"
  },
  {
    "path": "src/it/TEST-8/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-8-parent</artifactId>\n    <version>1.0.0</version>\n    <packaging>pom</packaging>\n\n    <name>Integration Test 8 (Parent)</name>\n\n    <profiles>\n        <profile>\n            <id>build-project1</id>\n            <modules>\n                <module>project1</module>\n            </modules>\n        </profile>\n        <profile>\n            <id>build-project2</id>\n            <modules>\n                <module>project2</module>\n            </modules>\n        </profile>\n    </profiles>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.xolstice.maven.plugins</groupId>\n                    <artifactId>protobuf-maven-plugin</artifactId>\n                    <version>@project.version@</version>\n                    <configuration>\n                        <protocArtifact>\n                            com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                        </protocArtifact>\n                    </configuration>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-8/project1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-8-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-8-project1</artifactId>\n\n    <name>Integration Test 8 (1)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile</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                        <goals>\n                            <goal>test-jar</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-8/project1/src/test/proto/test1.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n}\n"
  },
  {
    "path": "src/it/TEST-8/project2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-8-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-8-project2</artifactId>\n\n    <name>Integration Test 8 (2)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>test-compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>${project.groupId}</groupId>\n            <artifactId>test-8-project1</artifactId>\n            <version>1.0.0</version>\n            <type>test-jar</type>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/TEST-8/project2/src/test/proto/test2.proto",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\nimport \"test1.proto\";\n\noption java_package = \"it.project2.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage2 {\n    TestMessage1 included = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-8/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'project1/target/generated-test-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project1/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project1.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage1');\n\noutputDirectory = new File(basedir, 'project2/target/generated-test-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project2/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project2.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage2');\n\nreturn true;\n"
  },
  {
    "path": "src/it/TEST-9/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Verifies that protobuf definitions can be imported from other modules in the reactor. \\\n  The dependency has the default type of 'jar' (main protobuf files import \\\n  main protobuf files from another module). \\\n  In this test, imports are scoped to packages. \\\n  We need to make sure that package structure for protobuf definitions \\\n  is preserved in packaged jars, and correctly restored for importing.\n\ninvoker.goals = clean compile\n"
  },
  {
    "path": "src/it/TEST-9/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>it-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-9-parent</artifactId>\n    <version>1.0.0</version>\n    <packaging>pom</packaging>\n\n    <name>Integration Test 9 (Parent)</name>\n\n    <modules>\n        <module>project1</module>\n        <module>project2</module>\n    </modules>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.xolstice.maven.plugins</groupId>\n                    <artifactId>protobuf-maven-plugin</artifactId>\n                    <version>@project.version@</version>\n                    <configuration>\n                        <protocArtifact>\n                            com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n                        </protocArtifact>\n                    </configuration>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-9/project1/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-9-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-9-project1</artifactId>\n\n    <name>Integration Test 9 (1)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>\n"
  },
  {
    "path": "src/it/TEST-9/project1/src/main/proto/it/project1/test1.proto3",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage it.project1;\n\noption java_package = \"it.project1.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage1 {\n}\n"
  },
  {
    "path": "src/it/TEST-9/project2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <parent>\n        <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n        <artifactId>test-9-parent</artifactId>\n        <version>1.0.0</version>\n    </parent>\n\n    <artifactId>test-9-project2</artifactId>\n\n    <name>Integration Test 9 (2)</name>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.xolstice.maven.plugins</groupId>\n                <artifactId>protobuf-maven-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>${project.groupId}</groupId>\n            <artifactId>test-9-project1</artifactId>\n            <version>1.0.0</version>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/TEST-9/project2/src/main/proto/it/project2/test2.proto3",
    "content": "//\n// Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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//\n\nsyntax = \"proto3\";\n\npackage it.project2;\n\nimport \"it/project1/test1.proto3\";\n\noption java_package = \"it.project2.messages\";\noption java_outer_classname = \"TestProtos\";\noption optimize_for = SPEED;\n\nmessage TestMessage2 {\n    it.project1.TestMessage1 included = 1;\n}\n"
  },
  {
    "path": "src/it/TEST-9/verify.groovy",
    "content": "/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\noutputDirectory = new File(basedir, 'project1/target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project1/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project1.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage1');\n\noutputDirectory = new File(basedir, 'project2/target/generated-sources/protobuf/java');\nassert outputDirectory.exists();\nassert outputDirectory.isDirectory();\n\ngeneratedJavaFile = new File(outputDirectory, 'it/project2/messages/TestProtos.java');\nassert generatedJavaFile.exists();\nassert generatedJavaFile.isFile();\n\ncontent = generatedJavaFile.text;\nassert content.contains('package it.project2.messages');\nassert content.contains('class TestProtos');\nassert content.contains('class TestMessage2');\n\nreturn true;\n"
  },
  {
    "path": "src/it/dependencies/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n    <artifactId>it-dependencies</artifactId>\n    <version>1.0.0</version>\n    <packaging>pom</packaging>\n\n    <name>Integration Test Dependencies</name>\n    <description>\n        This POM file declares all plugins and dependencies that are used in integration tests.\n        CI tools can use this POM file to prefetch the dependencies into the local repository\n        ahead of running the tests, so that dependency caching can be implemented efficiently.\n    </description>\n\n    <properties>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n        <grpcVersion>1.7.0</grpcVersion>\n    </properties>\n\n    <build>\n        <extensions>\n            <extension>\n                <groupId>kr.motd.maven</groupId>\n                <artifactId>os-maven-plugin</artifactId>\n                <version>1.6.1</version>\n            </extension>\n        </extensions>\n\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-enforcer-plugin</artifactId>\n                    <version>3.0.0-M3</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-toolchains-plugin</artifactId>\n                    <version>3.0.0</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-compiler-plugin</artifactId>\n                    <version>3.8.1</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-surefire-plugin</artifactId>\n                    <version>3.0.0-M4</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-jar-plugin</artifactId>\n                    <version>3.2.0</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-dependency-plugin</artifactId>\n                    <version>3.1.1</version>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>io.grpc</groupId>\n            <artifactId>grpc-core</artifactId>\n            <version>${grpcVersion}</version>\n            <scope>runtime</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>io.grpc</groupId>\n            <artifactId>grpc-netty</artifactId>\n            <version>${grpcVersion}</version>\n            <scope>runtime</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>io.grpc</groupId>\n            <artifactId>grpc-protobuf</artifactId>\n            <version>${grpcVersion}</version>\n            <scope>runtime</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>io.grpc</groupId>\n            <artifactId>grpc-stub</artifactId>\n            <version>${grpcVersion}</version>\n            <scope>runtime</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>io.grpc</groupId>\n            <artifactId>protoc-gen-grpc-java</artifactId>\n            <version>${grpcVersion}</version>\n            <type>exe</type>\n            <classifier>${os.detected.classifier}</classifier>\n            <scope>provided</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>commons-cli</groupId>\n            <artifactId>commons-cli</artifactId>\n            <version>1.2</version>\n            <scope>runtime</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>commons-lang</groupId>\n            <artifactId>commons-lang</artifactId>\n            <version>2.6</version>\n            <scope>runtime</scope>\n        </dependency>\n\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.12</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n\n    <profiles>\n        <profile>\n            <id>protoc-3.4.0</id>\n\n            <properties>\n                <protobufVersion>3.4.0</protobufVersion>\n            </properties>\n\n            <dependencies>\n                <dependency>\n                    <groupId>com.google.protobuf</groupId>\n                    <artifactId>protobuf-java</artifactId>\n                    <version>${protobufVersion}</version>\n                    <scope>runtime</scope>\n                </dependency>\n\n                <dependency>\n                    <groupId>com.google.protobuf</groupId>\n                    <artifactId>protoc</artifactId>\n                    <version>${protobufVersion}</version>\n                    <type>exe</type>\n                    <classifier>${os.detected.classifier}</classifier>\n                    <scope>provided</scope>\n                </dependency>\n            </dependencies>\n        </profile>\n\n        <profile>\n            <id>protoc-3.11.1</id>\n\n            <properties>\n                <protobufVersion>3.11.1</protobufVersion>\n            </properties>\n\n            <dependencies>\n                <dependency>\n                    <groupId>com.google.protobuf</groupId>\n                    <artifactId>protobuf-java</artifactId>\n                    <version>${protobufVersion}</version>\n                    <scope>runtime</scope>\n                </dependency>\n\n                <dependency>\n                    <groupId>com.google.protobuf</groupId>\n                    <artifactId>protoc</artifactId>\n                    <version>${protobufVersion}</version>\n                    <type>exe</type>\n                    <classifier>${os.detected.classifier}</classifier>\n                    <scope>provided</scope>\n                </dependency>\n            </dependencies>\n        </profile>\n    </profiles>\n\n</project>\n"
  },
  {
    "path": "src/it/settings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<settings xmlns=\"http://maven.apache.org/SETTINGS/1.0.0\"\n          xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n          xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd\">\n\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                    </releases>\n                    <snapshots>\n                        <enabled>true</enabled>\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                    </releases>\n                    <snapshots>\n                        <enabled>true</enabled>\n                    </snapshots>\n                </pluginRepository>\n            </pluginRepositories>\n        </profile>\n    </profiles>\n</settings>\n"
  },
  {
    "path": "src/it/setup-it-parent/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = \\\n  Installs a common parent POM for all integration tests.\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean install\n"
  },
  {
    "path": "src/it/setup-it-parent/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n    <artifactId>it-parent</artifactId>\n    <version>1.0.0</version>\n    <packaging>pom</packaging>\n\n    <name>Integration Test Parent</name>\n\n    <properties>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n\n        <!-- JDK version -->\n        <java.sdk.version>1.8</java.sdk.version>\n        <!-- Settings for the java compiler -->\n        <java.compiler.compilerVersion>${java.sdk.version}</java.compiler.compilerVersion>\n        <java.compiler.source>${java.sdk.version}</java.compiler.source>\n        <java.compiler.target>${java.sdk.version}</java.compiler.target>\n\n        <mavenVersion>3.3.9</mavenVersion>\n\n        <protobufVersion>3.11.1</protobufVersion>\n        <protobufJavaArtifact>protobuf-java</protobufJavaArtifact>\n    </properties>\n\n    <build>\n        <extensions>\n            <extension>\n                <groupId>kr.motd.maven</groupId>\n                <artifactId>os-maven-plugin</artifactId>\n                <version>1.6.1</version>\n            </extension>\n        </extensions>\n\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-enforcer-plugin</artifactId>\n                    <version>3.0.0-M3</version>\n                    <inherited>true</inherited>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-toolchains-plugin</artifactId>\n                    <version>3.0.0</version>\n                    <inherited>true</inherited>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-resources-plugin</artifactId>\n                    <version>3.1.0</version>\n                    <inherited>true</inherited>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-compiler-plugin</artifactId>\n                    <version>3.8.1</version>\n                    <inherited>true</inherited>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-surefire-plugin</artifactId>\n                    <version>3.0.0-M4</version>\n                    <inherited>true</inherited>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-jar-plugin</artifactId>\n                    <version>3.2.0</version>\n                    <inherited>true</inherited>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-dependency-plugin</artifactId>\n                    <version>3.1.1</version>\n                    <inherited>true</inherited>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-enforcer-plugin</artifactId>\n                <executions>\n                    <execution>\n                        <id>enforce-build-environment</id>\n                        <goals>\n                            <goal>enforce</goal>\n                        </goals>\n                        <configuration>\n                            <rules>\n                                <requireMavenVersion>\n                                    <version>[${mavenVersion},)</version>\n                                </requireMavenVersion>\n                                <requireJavaVersion>\n                                    <version>[${java.sdk.version},)</version>\n                                </requireJavaVersion>\n                            </rules>\n                            <fail>true</fail>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-toolchains-plugin</artifactId>\n                <inherited>true</inherited>\n                <executions>\n                    <execution>\n                        <id>default-toolchain</id>\n                        <phase>validate</phase>\n                        <goals>\n                            <goal>toolchain</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <toolchains>\n                        <jdk>\n                            <version>[${java.sdk.version},)</version>\n                        </jdk>\n                    </toolchains>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <configuration>\n                    <fork>true</fork>\n                    <compilerVersion>${java.compiler.compilerVersion}</compilerVersion>\n                    <source>${java.compiler.source}</source>\n                    <target>${java.compiler.target}</target>\n                    <showDeprecation>false</showDeprecation>\n                    <showWarnings>false</showWarnings>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <groupId>com.google.protobuf</groupId>\n            <artifactId>${protobufJavaArtifact}</artifactId>\n            <version>${protobufVersion}</version>\n        </dependency>\n        <!-- Test dependencies -->\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.12</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/setup-protoc-plugin/invoker.properties",
    "content": "#\n# Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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#\n\n# An optional description for this build job to be included in the build reports.\ninvoker.description = install minimal protoc plugin\n\n# A comma or space separated list of goals/phases to execute, may\n# specify an empty list to execute the default goal of the IT project\ninvoker.goals = clean install\n"
  },
  {
    "path": "src/it/setup-protoc-plugin/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>org.xolstice.maven.plugins.protobuf.its</groupId>\n    <artifactId>test-protoc-plugin</artifactId>\n    <version>1.0.5</version>\n    <packaging>jar</packaging>\n\n    <name>Minimal protoc plugin</name>\n\n    <properties>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n\n        <!-- JDK version -->\n        <java.sdk.version>1.8</java.sdk.version>\n        <!-- Settings for the java compiler -->\n        <java.compiler.compilerVersion>${java.sdk.version}</java.compiler.compilerVersion>\n        <java.compiler.source>${java.sdk.version}</java.compiler.source>\n        <java.compiler.target>${java.sdk.version}</java.compiler.target>\n\n        <protobufVersion>3.4.0</protobufVersion>\n    </properties>\n\n    <build>\n        <pluginManagement>\n            <plugins>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-enforcer-plugin</artifactId>\n                    <version>3.0.0-M3</version>\n                    <inherited>true</inherited>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-toolchains-plugin</artifactId>\n                    <version>3.0.0</version>\n                    <inherited>true</inherited>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-resources-plugin</artifactId>\n                    <version>3.1.0</version>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-compiler-plugin</artifactId>\n                    <version>3.8.1</version>\n                    <inherited>true</inherited>\n                </plugin>\n                <plugin>\n                    <groupId>org.apache.maven.plugins</groupId>\n                    <artifactId>maven-jar-plugin</artifactId>\n                    <version>3.2.0</version>\n                </plugin>\n            </plugins>\n        </pluginManagement>\n\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-toolchains-plugin</artifactId>\n                <inherited>true</inherited>\n                <executions>\n                    <execution>\n                        <id>default-toolchain</id>\n                        <phase>validate</phase>\n                        <goals>\n                            <goal>toolchain</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <toolchains>\n                        <jdk>\n                            <version>[${java.sdk.version},)</version>\n                        </jdk>\n                    </toolchains>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <configuration>\n                    <fork>true</fork>\n                    <compilerVersion>${java.compiler.compilerVersion}</compilerVersion>\n                    <source>${java.compiler.source}</source>\n                    <target>${java.compiler.target}</target>\n                    <showDeprecation>true</showDeprecation>\n                    <showWarnings>true</showWarnings>\n                    <compilerArgument>-Xlint:all</compilerArgument>\n                    <testCompilerArgument>-Xlint:all</testCompilerArgument>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n    <dependencies>\n        <dependency>\n            <!-- This should be included into runtime resolution scope -->\n            <groupId>com.google.protobuf</groupId>\n            <artifactId>protobuf-java</artifactId>\n            <version>${protobufVersion}</version>\n            <scope>compile</scope>\n        </dependency>\n        <!-- The following dependencies are only here for the purpose of testing scopes in dependency resolution -->\n        <dependency>\n            <!-- This should be included into runtime resolution scope -->\n            <groupId>commons-cli</groupId>\n            <artifactId>commons-cli</artifactId>\n            <version>1.2</version>\n            <scope>runtime</scope>\n        </dependency>\n        <dependency>\n            <!-- This should be excluded from runtime resolution scope -->\n            <groupId>commons-lang</groupId>\n            <artifactId>commons-lang</artifactId>\n            <version>2.6</version>\n            <scope>provided</scope>\n        </dependency>\n        <!-- Test dependencies -->\n        <dependency>\n            <!-- This should be excluded from runtime resolution scope -->\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.12</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n</project>\n"
  },
  {
    "path": "src/it/setup-protoc-plugin/src/main/java/org/xolstice/protobuf/plugin/minimal/MinimalPlugin.java",
    "content": "package org.xolstice.protobuf.plugin.minimal;\n\n/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport com.google.protobuf.CodedInputStream;\nimport com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest;\nimport com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse;\nimport com.google.protobuf.compiler.PluginProtos.CodeGeneratorResponse.File;\n\nimport java.io.IOException;\n\n/**\n * A minimal protoc plugin that generates a file {@code foo.txt} for each protobuf file {@code foo.proto}.\n * The content of the generated file is the name of the source file. Optionally, a file name prefix can be\n * passed as an argument.\n */\npublic class MinimalPlugin {\n\n    public static void main(String... args) {\n\n        String prefix = (args.length > 0) ? args[0] : \"\";\n\n        try {\n            CodedInputStream in = CodedInputStream.newInstance(System.in);\n            CodeGeneratorRequest pluginRequest = CodeGeneratorRequest.newBuilder().mergeFrom(in).build();\n            CodeGeneratorResponse pluginResponse = generateCode(pluginRequest, prefix);\n            pluginResponse.writeTo(System.out);\n        } catch (Exception e) {\n            CodeGeneratorResponse errorResponse = CodeGeneratorResponse.newBuilder().setError(e.getMessage()).build();\n            try {\n                errorResponse.writeTo(System.out);\n            } catch (IOException ioe) {\n                // nothing we can do here\n            }\n        }\n    }\n\n    private static CodeGeneratorResponse generateCode(CodeGeneratorRequest request, String prefix) {\n        CodeGeneratorResponse.Builder responseBuilder = CodeGeneratorResponse.newBuilder();\n        for (String sourceFileName : request.getFileToGenerateList()) {\n            File.Builder fileBuilder = File.newBuilder();\n            fileBuilder.setName(prefix + sourceFileName.replace(\".proto\", \".txt\"));\n            fileBuilder.setContent(sourceFileName);\n            responseBuilder.addFile(fileBuilder);\n        }\n        return responseBuilder.build();\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/AbstractProtocCompileMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.plugins.annotations.Parameter;\n\nimport java.io.File;\nimport java.util.List;\n\nimport static java.util.Arrays.asList;\n\n/**\n * An abstract base mojo configuration for using {@code protoc} compiler with the main sources.\n *\n * @since 0.3.3\n */\npublic abstract class AbstractProtocCompileMojo extends AbstractProtocMojo {\n\n    /**\n     * The source directories containing the {@code .proto} definitions to be compiled.\n     */\n    @Parameter(\n            required = true,\n            defaultValue = \"${basedir}/src/main/proto\"\n    )\n    private File protoSourceRoot;\n\n    @Override\n    protected void doAttachProtoSources() {\n        projectHelper.addResource(project, getProtoSourceRoot().getAbsolutePath(),\n                asList(getIncludes()), asList(getExcludes()));\n    }\n\n    @Override\n    protected void doAttachGeneratedFiles() {\n        final File outputDirectory = getOutputDirectory();\n        project.addCompileSourceRoot(outputDirectory.getAbsolutePath());\n        buildContext.refresh(outputDirectory);\n    }\n\n    @Override\n    protected List<Artifact> getDependencyArtifacts() {\n        return project.getCompileArtifacts();\n    }\n\n    @Override\n    protected File getProtoSourceRoot() {\n        return protoSourceRoot;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/AbstractProtocMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.artifact.factory.ArtifactFactory;\nimport org.apache.maven.artifact.repository.ArtifactRepository;\nimport org.apache.maven.artifact.resolver.ArtifactResolutionException;\nimport org.apache.maven.artifact.resolver.ArtifactResolutionRequest;\nimport org.apache.maven.artifact.resolver.ArtifactResolutionResult;\nimport org.apache.maven.artifact.resolver.ArtifactResolver;\nimport org.apache.maven.artifact.resolver.ResolutionErrorHandler;\nimport org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;\nimport org.apache.maven.artifact.versioning.VersionRange;\nimport org.apache.maven.execution.MavenSession;\nimport org.apache.maven.plugin.AbstractMojo;\nimport org.apache.maven.plugin.MojoExecutionException;\nimport org.apache.maven.plugin.MojoFailureException;\nimport org.apache.maven.plugins.annotations.Component;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.project.MavenProject;\nimport org.apache.maven.project.MavenProjectHelper;\nimport org.apache.maven.repository.RepositorySystem;\nimport org.apache.maven.toolchain.Toolchain;\nimport org.apache.maven.toolchain.ToolchainManager;\nimport org.apache.maven.toolchain.java.DefaultJavaToolChain;\nimport org.codehaus.plexus.util.FileUtils;\nimport org.codehaus.plexus.util.Os;\nimport org.codehaus.plexus.util.SelectorUtils;\nimport org.codehaus.plexus.util.StringUtils;\nimport org.codehaus.plexus.util.cli.CommandLineException;\nimport org.codehaus.plexus.util.io.RawInputStreamFacade;\nimport org.sonatype.plexus.build.incremental.BuildContext;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.nio.charset.Charset;\nimport java.security.MessageDigest;\nimport java.security.NoSuchAlgorithmException;\nimport java.util.ArrayList;\nimport java.util.Enumeration;\nimport java.util.List;\nimport java.util.Set;\nimport java.util.jar.JarEntry;\nimport java.util.jar.JarFile;\n\nimport static java.lang.Math.max;\nimport static java.lang.String.format;\nimport static java.util.Arrays.asList;\nimport static java.util.Collections.emptyList;\nimport static java.util.Collections.emptyMap;\nimport static java.util.Collections.singleton;\nimport static org.codehaus.plexus.util.FileUtils.cleanDirectory;\nimport static org.codehaus.plexus.util.FileUtils.copyStreamToFile;\nimport static org.codehaus.plexus.util.FileUtils.getDefaultExcludesAsString;\nimport static org.codehaus.plexus.util.FileUtils.getFileNames;\nimport static org.codehaus.plexus.util.FileUtils.getFiles;\nimport static org.codehaus.plexus.util.StringUtils.join;\n\n/**\n * Abstract Mojo implementation.\n *\n * <p>This class is extended by {@link ProtocCompileMojo} and\n * {@link ProtocTestCompileMojo} in order to override the specific configuration for\n * compiling the main or test classes respectively.</p>\n */\nabstract class AbstractProtocMojo extends AbstractMojo {\n\n    private static final String DEFAULT_INCLUDES = \"**/*.proto*\";\n\n    /**\n     * The current Maven project.\n     */\n    @Parameter(defaultValue = \"${project}\", readonly = true)\n    protected MavenProject project;\n\n    /**\n     * The current Maven Session Object.\n     *\n     * @since 0.2.0\n     */\n    @Parameter(defaultValue = \"${session}\", readonly = true)\n    protected MavenSession session;\n\n    /**\n     * Build context that tracks changes to the source and target files.\n     *\n     * @since 0.3.0\n     */\n    @Component\n    protected BuildContext buildContext;\n\n    /**\n     * An optional tool chain manager.\n     *\n     * @since 0.2.0\n     */\n    @Component\n    protected ToolchainManager toolchainManager;\n\n    /**\n     * A helper used to add resources to the project.\n     */\n    @Component\n    protected MavenProjectHelper projectHelper;\n\n    /**\n     * A factory for Maven artifact definitions.\n     *\n     * @since 0.3.1\n     */\n    @Component\n    private ArtifactFactory artifactFactory;\n\n    /**\n     * A component that implements resolution of Maven artifacts from repositories.\n     *\n     * @since 0.3.1\n     */\n    @Component\n    private ArtifactResolver artifactResolver;\n\n    /**\n     * A component that handles resolution of Maven artifacts.\n     *\n     * @since 0.4.0\n     */\n    @Component\n    private RepositorySystem repositorySystem;\n\n    /**\n     * A component that handles resolution errors.\n     *\n     * @since 0.4.0\n     */\n    @Component\n    private ResolutionErrorHandler resolutionErrorHandler;\n\n    /**\n     * This is the path to the local maven {@code repository}.\n     */\n    @Parameter(\n            required = true,\n            readonly = true,\n            property = \"localRepository\"\n    )\n    private ArtifactRepository localRepository;\n\n    /**\n     * Remote repositories for artifact resolution.\n     *\n     * @since 0.3.0\n     */\n    @Parameter(\n            required = true,\n            readonly = true,\n            defaultValue = \"${project.remoteArtifactRepositories}\"\n    )\n    private List<ArtifactRepository> remoteRepositories;\n\n    /**\n     * A directory where temporary files will be generated.\n     *\n     * @since 0.6.0\n     */\n    @Parameter(\n            required = true,\n            readonly = true,\n            defaultValue = \"${project.build.directory}\"\n    )\n    private File tempDirectory;\n\n    /**\n     * A directory where native launchers for java protoc plugins will be generated.\n     *\n     * @since 0.3.0\n     */\n    @Parameter(\n            required = false,\n            defaultValue = \"${project.build.directory}/protoc-plugins\"\n    )\n    private File protocPluginDirectory;\n\n    /**\n     * This is the path to the {@code protoc} executable.\n     * When this parameter is not set, the plugin attempts to load\n     * a {@code protobuf} toolchain and use it locate {@code protoc} executable.\n     * If no {@code protobuf} toolchain is defined in the project,\n     * the {@code protoc} executable in the {@code PATH} is used.\n     */\n    @Parameter(\n            required = false,\n            property = \"protocExecutable\"\n    )\n    private String protocExecutable;\n\n    /**\n     * Protobuf compiler artifact specification, in {@code groupId:artifactId:version[:type[:classifier]]} format.\n     * When this parameter is set, the plugin attempts to resolve the specified artifact as {@code protoc} executable.\n     *\n     * @since 0.4.1\n     */\n    @Parameter(\n            required = false,\n            property = \"protocArtifact\"\n    )\n    private String protocArtifact;\n\n    /**\n     * Additional source paths for {@code .proto} definitions.\n     */\n    @Parameter(\n            required = false\n    )\n    private File[] additionalProtoPathElements = {};\n\n    /**\n     * Since {@code protoc} cannot access jars, proto files in dependencies are extracted to this location\n     * and deleted on exit. This directory is always cleaned during execution.\n     */\n    @Parameter(\n            required = true,\n            defaultValue = \"${project.build.directory}/protoc-dependencies\"\n    )\n    private File temporaryProtoFileDirectory;\n\n    /**\n     * Set this to {@code false} to disable hashing of dependent jar paths.\n     * <p/>\n     * This plugin expands jars on the classpath looking for embedded {@code .proto} files.\n     * Normally these paths are hashed (MD5) to avoid issues with long file names on windows.\n     * However if this property is set to {@code false} longer paths will be used.\n     */\n    @Parameter(\n            required = true,\n            defaultValue = \"true\"\n    )\n    private boolean hashDependentPaths;\n\n    /**\n     * A list of &lt;include&gt; elements specifying the protobuf definition files (by pattern)\n     * that should be included in compilation.\n     * When not specified, the default includes will be:\n     * <code><br/>\n     * &lt;includes&gt;<br/>\n     * &nbsp;&lt;include&gt;**&#47;*.proto&lt;/include&gt;<br/>\n     * &lt;/includes&gt;<br/>\n     * </code>\n     */\n    @Parameter(\n            required = false\n    )\n    private String[] includes = {DEFAULT_INCLUDES};\n\n    /**\n     * A list of &lt;exclude&gt; elements specifying the protobuf definition files (by pattern)\n     * that should be excluded from compilation.\n     * When not specified, the default excludes will be empty:\n     * <code><br/>\n     * &lt;excludes&gt;<br/>\n     * &lt;/excludes&gt;<br/>\n     * </code>\n     */\n    @Parameter(\n            required = false\n    )\n    private String[] excludes = {};\n\n    /**\n     * If set to {@code true}, then the specified protobuf source files from this project will be attached\n     * as resources to the build, for subsequent inclusion into the final artifact.\n     * This is the default behaviour, as it allows downstream projects to import protobuf definitions\n     * from the upstream projects, and those imports are automatically resolved at build time.\n     *\n     * <p>If distribution of {@code .proto} source files is undesirable for security reasons\n     * or because of other considerations, then this parameter should be set to {@code false}.</p>\n     *\n     * @since 0.4.1\n     */\n    @Parameter(\n            required = true,\n            defaultValue = \"true\"\n    )\n    protected boolean attachProtoSources;\n\n    /**\n     * If set to {@code true}, all command line arguments to protoc will be written to a file,\n     * and only a path to that file will be passed to protoc on the command line.\n     * This helps prevent <i>Command line is too long</i> errors when the number of {@code .proto} files is large.\n     *\n     * <p><b>NOTE:</b> This is only supported for protoc 3.5.0 and higher.</p>\n     *\n     * @since 0.6.0\n     */\n    @Parameter(\n            required = false,\n            defaultValue = \"false\"\n    )\n    protected boolean useArgumentFile;\n\n    /**\n     * Specifies one of more custom protoc plugins, written in Java\n     * and available as Maven artifacts. An executable plugin will be created\n     * at execution time. On UNIX the executable is a shell script and on\n     * Windows it is a WinRun4J .exe and .ini.\n     */\n    @Parameter(\n            required = false\n    )\n    private List<ProtocPlugin> protocPlugins;\n\n    /**\n     * Sets the granularity in milliseconds of the last modification date\n     * for testing whether source protobuf definitions need recompilation.\n     *\n     * <p>This parameter is only used when {@link #checkStaleness} parameter is set to {@code true}.\n     *\n     * <p>If the project is built on NFS it's recommended to set this parameter to {@code 10000}.\n     */\n    @Parameter(\n            required = false,\n            defaultValue = \"0\"\n    )\n    private long staleMillis;\n\n    /**\n     * Normally {@code protoc} is invoked on every execution of the plugin.\n     * Setting this parameter to {@code true} will enable checking\n     * timestamps of source protobuf definitions vs. generated sources.\n     *\n     * @see #staleMillis\n     */\n    @Parameter(\n            required = false,\n            defaultValue = \"false\"\n    )\n    private boolean checkStaleness;\n\n    /**\n     * When {@code true}, skip the execution.\n     *\n     * @since 0.2.0\n     */\n    @Parameter(\n            required = false,\n            property = \"protoc.skip\",\n            defaultValue = \"false\"\n    )\n    private boolean skip;\n\n    /**\n     * Usually most of protobuf mojos will not get executed on parent poms\n     * (i.e. projects with packaging type 'pom').\n     * Setting this parameter to {@code true} will force\n     * the execution of this mojo, even if it would usually get skipped in this case.\n     *\n     * @since 0.2.0\n     */\n    @Parameter(\n            required = false,\n            property = \"protoc.force\",\n            defaultValue = \"false\"\n    )\n    private boolean forceMojoExecution;\n\n    /**\n     * When {@code true}, the output directory will be cleared out prior to code generation.\n     * With the latest versions of protoc (2.5.0 or later) this is generally not required,\n     * although some earlier versions reportedly had issues with running\n     * two code generations in a row without clearing out the output directory in between.\n     *\n     * @since 0.4.0\n     */\n    @Parameter(\n            required = false,\n            property = \"protoc.clearOutputDirectory\",\n            defaultValue = \"false\"\n    )\n    private boolean clearOutputDirectory;\n\n    /**\n     * Executes the mojo.\n     */\n    @Override\n    public void execute() throws MojoExecutionException, MojoFailureException {\n\n        if (skipMojo()) {\n            return;\n        }\n\n        try {\n            checkParameters();\n        } catch (final MojoConfigurationException e) {\n            throw new MojoExecutionException(\"Configuration error: \" + e.getMessage(), e);\n        } catch (final MojoInitializationException e) {\n            throw new MojoExecutionException(e.getMessage(), e);\n        }\n\n        final File protoSourceRoot = getProtoSourceRoot();\n        if (protoSourceRoot.exists()) {\n            try {\n                final List<File> protoFiles = findProtoFilesInDirectory(protoSourceRoot);\n                final File outputDirectory = getOutputDirectory();\n                final List<File> outputFiles = findGeneratedFilesInDirectory(getOutputDirectory());\n\n                if (protoFiles.isEmpty()) {\n                    getLog().info(\"No proto files to compile.\");\n                } else if (!hasDelta(protoFiles)) {\n                    getLog().info(\"Skipping compilation because build context has no changes.\");\n                    doAttachFiles();\n                } else if (checkStaleness && checkFilesUpToDate(protoFiles, outputFiles)) {\n                    getLog().info(\"Skipping compilation because target directory newer than sources.\");\n                    doAttachFiles();\n                } else {\n                    final List<File> derivedProtoPathElements =\n                            makeProtoPathFromJars(temporaryProtoFileDirectory, getDependencyArtifactFiles());\n                    FileUtils.mkdir(outputDirectory.getAbsolutePath());\n\n                    if (clearOutputDirectory) {\n                        try {\n                            cleanDirectory(outputDirectory);\n                        } catch (final IOException e) {\n                            throw new MojoInitializationException(\"Unable to clean output directory\", e);\n                        }\n                    }\n\n                    createProtocPlugins();\n\n                    //get toolchain from context\n                    final Toolchain tc = toolchainManager.getToolchainFromBuildContext(\"protobuf\", session); //NOI18N\n                    if (tc != null) {\n                        getLog().info(\"Toolchain in protobuf-maven-plugin: \" + tc);\n                        //when the executable to use is explicitly set by user in mojo's parameter, ignore toolchains.\n                        if (protocExecutable != null) {\n                            getLog().warn(\n                                    \"Toolchains are ignored, 'protocExecutable' parameter is set to \" + protocExecutable);\n                        } else {\n                            //assign the path to executable from toolchains\n                            protocExecutable = tc.findTool(\"protoc\"); //NOI18N\n                        }\n                    }\n                    if (protocExecutable == null && protocArtifact != null) {\n                        final Artifact artifact = createDependencyArtifact(protocArtifact);\n                        final File file = resolveBinaryArtifact(artifact);\n                        protocExecutable = file.getAbsolutePath();\n                    }\n                    if (protocExecutable == null) {\n                        // Try to fall back to 'protoc' in $PATH\n                        getLog().warn(\"No 'protocExecutable' parameter is configured, using the default: 'protoc'\");\n                        protocExecutable = \"protoc\";\n                    }\n\n                    final Protoc.Builder protocBuilder =\n                            new Protoc.Builder(protocExecutable)\n                                    .addProtoPathElement(protoSourceRoot)\n                                    .addProtoPathElements(derivedProtoPathElements)\n                                    .addProtoPathElements(asList(additionalProtoPathElements))\n                                    .addProtoFiles(protoFiles);\n                    addProtocBuilderParameters(protocBuilder);\n                    final Protoc protoc = protocBuilder.build();\n\n                    if (getLog().isDebugEnabled()) {\n                        getLog().debug(\"Proto source root:\");\n                        getLog().debug(\" \" + protoSourceRoot);\n\n                        if (derivedProtoPathElements != null && !derivedProtoPathElements.isEmpty()) {\n                            getLog().debug(\"Derived proto paths:\");\n                            for (final File path : derivedProtoPathElements) {\n                                getLog().debug(\" \" + path);\n                            }\n                        }\n\n                        if (additionalProtoPathElements != null && additionalProtoPathElements.length > 0) {\n                            getLog().debug(\"Additional proto paths:\");\n                            for (final File path : additionalProtoPathElements) {\n                                getLog().debug(\" \" + path);\n                            }\n                        }\n                    }\n                    protoc.logExecutionParameters(getLog());\n\n                    getLog().info(format(\"Compiling %d proto file(s) to %s\", protoFiles.size(), outputDirectory));\n\n                    final int exitStatus = protoc.execute(getLog());\n                    if (StringUtils.isNotBlank(protoc.getOutput())) {\n                        getLog().info(\"PROTOC: \" + protoc.getOutput());\n                    }\n                    if (exitStatus != 0) {\n                        getLog().error(\"PROTOC FAILED: \" + protoc.getError());\n                        for (File pf : protoFiles) {\n                            buildContext.removeMessages(pf);\n                            buildContext.addMessage(pf, 0, 0, protoc.getError(), BuildContext.SEVERITY_ERROR, null);\n                        }\n                        throw new MojoFailureException(\n                                \"protoc did not exit cleanly. Review output for more information.\");\n                    } else if (StringUtils.isNotBlank(protoc.getError())) {\n                        getLog().warn(\"PROTOC: \" + protoc.getError());\n                    }\n                    doAttachFiles();\n                }\n            } catch (final MojoConfigurationException e) {\n                throw new MojoExecutionException(\"Configuration error: \" + e.getMessage(), e);\n            } catch (final MojoInitializationException e) {\n                throw new MojoExecutionException(e.getMessage(), e);\n            } catch (final CommandLineException e) {\n                throw new MojoExecutionException(\"An error occurred while invoking protoc: \" + e.getMessage(), e);\n            } catch (final InterruptedException e) {\n                getLog().info(\"Process interrupted\");\n            }\n        } else {\n            getLog().info(format(\"%s does not exist. Review the configuration or consider disabling the plugin.\",\n                    protoSourceRoot));\n        }\n    }\n\n    /**\n     * Generates native launchers for java protoc plugins.\n     * These launchers will later be added as parameters for protoc compiler.\n     *\n     * @since 0.3.0\n     */\n    protected void createProtocPlugins() {\n        if (protocPlugins == null) {\n            return;\n        }\n        final String javaHome = detectJavaHome();\n\n        for (final ProtocPlugin plugin : protocPlugins) {\n\n            if (plugin.getJavaHome() != null) {\n                getLog().debug(\"Using javaHome defined in plugin definition: \" + plugin.getJavaHome());\n            } else {\n                getLog().debug(\"Setting javaHome for plugin: \" + javaHome);\n                plugin.setJavaHome(javaHome);\n            }\n\n            getLog().info(\"Building protoc plugin: \" + plugin.getId());\n            final ProtocPluginAssembler assembler = new ProtocPluginAssembler(\n                    plugin,\n                    session,\n                    project.getArtifact(),\n                    artifactFactory,\n                    repositorySystem,\n                    resolutionErrorHandler,\n                    localRepository,\n                    remoteRepositories,\n                    protocPluginDirectory,\n                    getLog());\n            assembler.execute();\n        }\n    }\n\n    /**\n     * Attempts to detect java home directory, using {@code jdk} toolchain if available,\n     * with a fallback to {@code java.home} system property.\n     *\n     * @return path to java home directory.\n     *\n     * @since 0.3.0\n     */\n    protected String detectJavaHome() {\n        String javaHome = null;\n\n        final Toolchain tc = toolchainManager.getToolchainFromBuildContext(\"jdk\", session);\n        if (tc != null) {\n            if (tc instanceof DefaultJavaToolChain) {\n                javaHome = ((DefaultJavaToolChain) tc).getJavaHome();\n                if (javaHome != null) {\n                    getLog().debug(\"Using javaHome from toolchain: \" + javaHome);\n                }\n            } else {\n                // Try to infer JAVA_HOME from location of 'java' tool in toolchain, if available.\n                // We don't use 'java' directly because for Windows we need to find the path to\n                // jvm.dll instead, which the assembler tries to figure out relative to JAVA_HOME.\n                final String javaExecutable = tc.findTool(\"java\");\n                if (javaExecutable != null) {\n                    File parent = new File(javaExecutable).getParentFile();\n                    if (parent != null) {\n                        parent = parent.getParentFile();\n                        if (parent != null && parent.isDirectory()) {\n                            javaHome = parent.getAbsolutePath();\n                            getLog().debug(\n                                    \"Using javaHome based on 'java' location returned by toolchain: \" + javaHome);\n                        }\n                    }\n                }\n            }\n        }\n        if (javaHome == null) {\n            // Default location is the current JVM's JAVA_HOME.\n            javaHome = System.getProperty(\"java.home\");\n            getLog().debug(\"Using javaHome from java.home system property: \" + javaHome);\n        }\n        return javaHome;\n    }\n\n    /**\n     * Adds mojo-specific parameters to the protoc builder.\n     *\n     * @param protocBuilder the builder to be modified.\n     */\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        if (protocPlugins != null) {\n            for (final ProtocPlugin plugin : protocPlugins) {\n                protocBuilder.addPlugin(plugin);\n            }\n            protocPluginDirectory.mkdirs();\n            protocBuilder.setPluginDirectory(protocPluginDirectory);\n        }\n        protocBuilder.setTempDirectory(tempDirectory);\n        protocBuilder.useArgumentFile(useArgumentFile);\n    }\n\n    /**\n     * <p>Determine if the mojo execution should get skipped.</p>\n     * This is the case if:\n     * <ul>\n     * <li>{@link #skip} is <code>true</code></li>\n     * <li>if the mojo gets executed on a project with packaging type 'pom' and\n     * {@link #forceMojoExecution} is <code>false</code></li>\n     * </ul>\n     *\n     * @return <code>true</code> if the mojo execution should be skipped.\n     *\n     * @since 0.2.0\n     */\n    protected boolean skipMojo() {\n        if (skip) {\n            getLog().info(\"Skipping mojo execution\");\n            return true;\n        }\n\n        if (!forceMojoExecution && \"pom\".equals(this.project.getPackaging())) {\n            getLog().info(\"Skipping mojo execution for project with packaging type 'pom'\");\n            return true;\n        }\n\n        return false;\n    }\n\n    protected static List<File> findGeneratedFilesInDirectory(final File directory) {\n        if (directory == null || !directory.isDirectory()) {\n            return emptyList();\n        }\n\n        final List<File> generatedFilesInDirectory;\n        try {\n            generatedFilesInDirectory = getFiles(directory, \"**/*\", getDefaultExcludesAsString());\n        } catch (final IOException e) {\n            throw new MojoInitializationException(\"Unable to scan output directory\", e);\n        }\n        return generatedFilesInDirectory;\n    }\n\n    /**\n     * Returns timestamp for the most recently modified file in the given set.\n     *\n     * @param files a collection of file descriptors.\n     * @return timestamp of the most recently modified file.\n     */\n    protected static long lastModified(final Iterable<File> files) {\n        long result = 0L;\n        for (final File file : files) {\n            result = max(result, file.lastModified());\n        }\n        return result;\n    }\n\n    /**\n     * Checks that the source files don't have modification time that is later than the target files.\n     *\n     * @param sourceFiles a collection of source files.\n     * @param targetFiles a collection of target files.\n     * @return {@code true}, if source files are not later than the target files; {@code false}, otherwise.\n     */\n    protected boolean checkFilesUpToDate(final Iterable<File> sourceFiles, final Iterable<File> targetFiles) {\n        return lastModified(sourceFiles) + staleMillis < lastModified(targetFiles);\n    }\n\n    /**\n     * Checks if the injected build context has changes in any of the specified files.\n     *\n     * @param files files to be checked for changes.\n     * @return {@code true}, if at least one file has changes; {@code false}, if no files have changes.\n     *\n     * @since 0.3.0\n     */\n    protected boolean hasDelta(final Iterable<File> files) {\n        for (final File file : files) {\n            if (buildContext.hasDelta(file)) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    protected void checkParameters() {\n        if (project == null) {\n            throw new MojoConfigurationException(\"'project' is null\");\n        }\n        if (projectHelper == null) {\n            throw new MojoConfigurationException(\"'projectHelper' is null\");\n        }\n        final File protoSourceRoot = getProtoSourceRoot();\n        if (protoSourceRoot == null) {\n            throw new MojoConfigurationException(\"'protoSourceRoot' is null\");\n        }\n        if (protoSourceRoot.isFile()) {\n            throw new MojoConfigurationException(\"'protoSourceRoot' is a file, not a directory\");\n        }\n        if (temporaryProtoFileDirectory == null) {\n            throw new MojoConfigurationException(\"'temporaryProtoFileDirectory' is null\");\n        }\n        if (temporaryProtoFileDirectory.isFile()) {\n            throw new MojoConfigurationException(\"'temporaryProtoFileDirectory' is a file, not a directory\");\n        }\n        final File outputDirectory = getOutputDirectory();\n        if (outputDirectory == null) {\n            throw new MojoConfigurationException(\"'outputDirectory' is null\");\n        }\n        if (outputDirectory.isFile()) {\n            throw new MojoConfigurationException(\"'outputDirectory' is a file, not a directory\");\n        }\n    }\n\n    protected abstract File getProtoSourceRoot();\n\n    protected String[] getIncludes() {\n        return includes;\n    }\n\n    protected String[] getExcludes() {\n        return excludes;\n    }\n\n    // TODO add artifact filtering (inclusions and exclusions)\n    // TODO add filtering for proto definitions in included artifacts\n    protected abstract List<Artifact> getDependencyArtifacts();\n\n    /**\n     * Returns the output directory for generated sources. Depends on build phase so must\n     * be defined in concrete implementation.\n     *\n     * @return output directory for generated sources.\n     */\n    protected abstract File getOutputDirectory();\n\n    protected void doAttachFiles() {\n        if (attachProtoSources) {\n            doAttachProtoSources();\n        }\n        doAttachGeneratedFiles();\n    }\n\n    protected abstract void doAttachProtoSources();\n\n    protected abstract void doAttachGeneratedFiles();\n\n    /**\n     * Gets the {@link File} for each dependency artifact.\n     *\n     * @return A list of all dependency artifacts.\n     */\n    protected List<File> getDependencyArtifactFiles() {\n        final List<Artifact> dependencyArtifacts = getDependencyArtifacts();\n        if (dependencyArtifacts.isEmpty()) {\n            return emptyList();\n        }\n        final List<File> dependencyArtifactFiles = new ArrayList<>(dependencyArtifacts.size());\n        for (final Artifact artifact : dependencyArtifacts) {\n            dependencyArtifactFiles.add(artifact.getFile());\n        }\n        return dependencyArtifactFiles;\n    }\n\n    /**\n     * Unpacks proto descriptors that are bundled inside dependent artifacts into a temporary directory.\n     * This is needed because protobuf compiler cannot handle imported descriptors that are packed inside jar files.\n     *\n     * @param temporaryProtoFileDirectory temporary directory to serve as root for unpacked structure.\n     * @param classpathElementFiles classpath elements, can be either jar files or directories.\n     * @return a list of import roots for protobuf compiler\n     *         (these will all be subdirectories of the temporary directory).\n     */\n    protected List<File> makeProtoPathFromJars(\n            final File temporaryProtoFileDirectory,\n            final Iterable<File> classpathElementFiles\n    ) {\n        if (classpathElementFiles == null) {\n            throw new MojoConfigurationException(\"'classpathElementFiles' is null\");\n        }\n        if (!classpathElementFiles.iterator().hasNext()) {\n            return emptyList();\n        }\n        // clean the temporary directory to ensure that stale files aren't used\n        if (temporaryProtoFileDirectory.exists()) {\n            try {\n                cleanDirectory(temporaryProtoFileDirectory);\n            } catch (IOException e) {\n                throw new MojoInitializationException(\"Unable to clean up temporary proto file directory\", e);\n            }\n        }\n        final List<File> protoDirectories = new ArrayList<>();\n        for (final File classpathElementFile : classpathElementFiles) {\n            // for some reason under IAM, we receive poms as dependent files\n            // I am excluding .xml rather than including .jar as there may be other extensions in use (sar, har, zip)\n            if (classpathElementFile.isFile() && classpathElementFile.canRead() &&\n                    !classpathElementFile.getName().endsWith(\".xml\")) {\n\n                // create the jar file. the constructor validates.\n                try (final JarFile classpathJar = new JarFile(classpathElementFile)) {\n                    final Enumeration<JarEntry> jarEntries = classpathJar.entries();\n                    while (jarEntries.hasMoreElements()) {\n                        final JarEntry jarEntry = jarEntries.nextElement();\n                        final String jarEntryName = jarEntry.getName();\n                        if (!jarEntry.isDirectory() && SelectorUtils.matchPath(DEFAULT_INCLUDES, jarEntryName, \"/\", true)) {\n                            final File jarDirectory;\n                            try {\n                                jarDirectory = new File(temporaryProtoFileDirectory, truncatePath(classpathJar.getName()));\n                                // Check for Zip Slip vulnerability\n                                // https://snyk.io/research/zip-slip-vulnerability\n                                final String canonicalJarDirectoryPath = jarDirectory.getCanonicalPath();\n                                final File uncompressedCopy = new File(jarDirectory, jarEntryName);\n                                final String canonicalUncompressedCopyPath = uncompressedCopy.getCanonicalPath();\n                                if (!canonicalUncompressedCopyPath.startsWith(canonicalJarDirectoryPath + File.separator)) {\n                                    throw new MojoInitializationException(\n                                            \"ZIP SLIP: Entry \" + jarEntry.getName() +\n                                                    \" in \" + classpathJar.getName() + \" is outside of the target dir\");\n                                }\n                                FileUtils.mkdir(uncompressedCopy.getParentFile().getAbsolutePath());\n                                copyStreamToFile(\n                                        new RawInputStreamFacade(classpathJar.getInputStream(jarEntry)),\n                                        uncompressedCopy);\n                            } catch (final IOException e) {\n                                throw new MojoInitializationException(\"Unable to unpack proto files\", e);\n                            }\n                            protoDirectories.add(jarDirectory);\n                        }\n                    }\n                } catch (final IOException e) {\n                    throw new MojoInitializationException(\n                            \"Not a readable JAR artifact: \" + classpathElementFile.getAbsolutePath(), e);\n                }\n            } else if (classpathElementFile.isDirectory()) {\n                final List<String> protoFiles;\n                try {\n                    protoFiles = getFileNames(classpathElementFile, DEFAULT_INCLUDES, null, true);\n                } catch (final IOException e) {\n                    throw new MojoInitializationException(\n                            \"Unable to scan for proto files in: \" + classpathElementFile.getAbsolutePath(), e);\n                }\n                if (!protoFiles.isEmpty()) {\n                    protoDirectories.add(classpathElementFile);\n                }\n            }\n        }\n        return protoDirectories;\n    }\n\n    protected List<File> findProtoFilesInDirectory(final File directory) {\n        if (directory == null) {\n            throw new MojoConfigurationException(\"'directory' is null\");\n        }\n        if (!directory.isDirectory()) {\n            throw new MojoConfigurationException(format(\"%s is not a directory\", directory));\n        }\n        final List<File> protoFilesInDirectory;\n        try {\n            final String includes = join(getIncludes(), \",\");\n            final String excludes = join(getExcludes(), \",\");\n            protoFilesInDirectory = getFiles(directory, includes, excludes);\n        } catch (IOException e) {\n            throw new MojoInitializationException(\"Unable to retrieve the list of files: \" + e.getMessage(), e);\n        }\n        return protoFilesInDirectory;\n    }\n\n    protected List<File> findProtoFilesInDirectories(final Iterable<File> directories) {\n        if (directories == null) {\n            throw new MojoConfigurationException(\"'directories' is null\");\n        }\n        final List<File> protoFiles = new ArrayList<>();\n        for (final File directory : directories) {\n            protoFiles.addAll(findProtoFilesInDirectory(directory));\n        }\n        return protoFiles;\n    }\n\n    /**\n     * Truncates the path of jar files so that they are relative to the local repository.\n     *\n     * @param jarPath the full path of a jar file.\n     * @return the truncated path relative to the local repository or root of the drive.\n     */\n    protected String truncatePath(final String jarPath) {\n\n        if (hashDependentPaths) {\n            return md5Hash(jarPath);\n        }\n\n        String repository = localRepository.getBasedir().replace('\\\\', '/');\n        if (!repository.endsWith(\"/\")) {\n            repository += \"/\";\n        }\n\n        String path = jarPath.replace('\\\\', '/');\n        final int repositoryIndex = path.indexOf(repository);\n        if (repositoryIndex != -1) {\n            path = path.substring(repositoryIndex + repository.length());\n        }\n\n        // By now the path should be good, but do a final check to fix windows machines.\n        final int colonIndex = path.indexOf(':');\n        if (colonIndex != -1) {\n            // 2 = :\\ in C:\\\n            path = path.substring(colonIndex + 2);\n        }\n\n        return path;\n    }\n\n    private static String md5Hash(final String string) {\n        final MessageDigest digest;\n        try {\n            digest = MessageDigest.getInstance(\"MD5\");\n        } catch (final NoSuchAlgorithmException e) {\n            throw new MojoInitializationException(\"Unable to create MD5 digest\", e);\n        }\n        final byte[] input = string.getBytes(Charset.forName(\"UTF-8\"));\n        return toHexString(digest.digest(input));\n    }\n\n    private static final char[] HEX_CHARS = \"0123456789abcdef\".toCharArray();\n\n    protected static String toHexString(final byte[] byteArray) {\n        final StringBuilder hexString = new StringBuilder(2 * byteArray.length);\n        for (final byte b : byteArray) {\n            hexString.append(HEX_CHARS[(b & 0xF0) >> 4]).append(HEX_CHARS[b & 0x0F]);\n        }\n        return hexString.toString();\n    }\n\n    protected File resolveBinaryArtifact(final Artifact artifact) {\n        final ArtifactResolutionResult result;\n        final ArtifactResolutionRequest request = new ArtifactResolutionRequest()\n                .setArtifact(project.getArtifact())\n                .setResolveRoot(false)\n                .setResolveTransitively(false)\n                .setArtifactDependencies(singleton(artifact))\n                .setManagedVersionMap(emptyMap())\n                .setLocalRepository(localRepository)\n                .setRemoteRepositories(remoteRepositories)\n                .setOffline(session.isOffline())\n                .setForceUpdate(session.getRequest().isUpdateSnapshots())\n                .setServers(session.getRequest().getServers())\n                .setMirrors(session.getRequest().getMirrors())\n                .setProxies(session.getRequest().getProxies());\n\n        result = repositorySystem.resolve(request);\n\n        try {\n            resolutionErrorHandler.throwErrors(request, result);\n        } catch (final ArtifactResolutionException e) {\n            throw new MojoInitializationException(\"Unable to resolve artifact: \" + e.getMessage(), e);\n        }\n\n        final Set<Artifact> artifacts = result.getArtifacts();\n\n        if (artifacts == null || artifacts.isEmpty()) {\n            throw new MojoInitializationException(\"Unable to resolve artifact\");\n        }\n\n        final Artifact resolvedBinaryArtifact = artifacts.iterator().next();\n        if (getLog().isDebugEnabled()) {\n            getLog().debug(\"Resolved artifact: \" + resolvedBinaryArtifact);\n        }\n\n        // Copy the file to the project build directory and make it executable\n        final File sourceFile = resolvedBinaryArtifact.getFile();\n        final String sourceFileName = sourceFile.getName();\n        final String targetFileName;\n        if (Os.isFamily(Os.FAMILY_WINDOWS) && !sourceFileName.endsWith(\".exe\")) {\n            targetFileName = sourceFileName + \".exe\";\n        } else {\n            targetFileName = sourceFileName;\n        }\n        final File targetFile = new File(protocPluginDirectory, targetFileName);\n        if (targetFile.exists()) {\n            // The file must have already been copied in a prior plugin execution/invocation\n            getLog().debug(\"Executable file already exists: \" + targetFile.getAbsolutePath());\n            return targetFile;\n        }\n        try {\n            FileUtils.forceMkdir(protocPluginDirectory);\n        } catch (final IOException e) {\n            throw new MojoInitializationException(\"Unable to create directory \" + protocPluginDirectory, e);\n        }\n        try {\n            FileUtils.copyFile(sourceFile, targetFile);\n        } catch (final IOException e) {\n            throw new MojoInitializationException(\"Unable to copy the file to \" + protocPluginDirectory, e);\n        }\n        if (!Os.isFamily(Os.FAMILY_WINDOWS)) {\n            targetFile.setExecutable(true);\n        }\n\n        if (getLog().isDebugEnabled()) {\n            getLog().debug(\"Executable file: \" + targetFile.getAbsolutePath());\n        }\n        return targetFile;\n    }\n\n    /**\n     * Creates a dependency artifact from a specification in\n     * {@code groupId:artifactId:version[:type[:classifier]]} format.\n     *\n     * @param artifactSpec artifact specification.\n     * @return artifact object instance.\n     */\n    protected Artifact createDependencyArtifact(final String artifactSpec) {\n        final String[] parts = artifactSpec.split(\":\");\n        if (parts.length < 3 || parts.length > 5) {\n            throw new MojoConfigurationException(\n                    \"Invalid artifact specification format\"\n                            + \", expected: groupId:artifactId:version[:type[:classifier]]\"\n                            + \", actual: \" + artifactSpec);\n        }\n        final String type = parts.length >= 4 ? parts[3] : \"exe\";\n        final String classifier = parts.length == 5 ? parts[4] : null;\n        return createDependencyArtifact(parts[0], parts[1], parts[2], type, classifier);\n    }\n\n    protected Artifact createDependencyArtifact(\n            final String groupId,\n            final String artifactId,\n            final String version,\n            final String type,\n            final String classifier\n    ) {\n        final VersionRange versionSpec;\n        try {\n            versionSpec = VersionRange.createFromVersionSpec(version);\n        } catch (final InvalidVersionSpecificationException e) {\n            throw new MojoConfigurationException(\"Invalid version specification\", e);\n        }\n        return artifactFactory.createDependencyArtifact(\n                groupId,\n                artifactId,\n                versionSpec,\n                type,\n                classifier,\n                Artifact.SCOPE_RUNTIME);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/AbstractProtocTestCompileMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.plugins.annotations.Parameter;\n\nimport java.io.File;\nimport java.util.List;\n\nimport static java.util.Arrays.asList;\n\n/**\n * An abstract base mojo configuration for using {@code protoc} compiler with the test sources.\n *\n * @since 0.3.3\n */\npublic abstract class AbstractProtocTestCompileMojo extends AbstractProtocMojo {\n\n    /**\n     * The source directories containing the test {@code .proto} definitions to be compiled.\n     */\n    @Parameter(\n            required = true,\n            defaultValue = \"${basedir}/src/test/proto\"\n    )\n    private File protoTestSourceRoot;\n\n    @Override\n    protected void doAttachProtoSources() {\n        projectHelper.addTestResource(project, getProtoSourceRoot().getAbsolutePath(),\n                asList(getIncludes()), asList(getExcludes()));\n    }\n\n    @Override\n    protected void doAttachGeneratedFiles() {\n        final File outputDirectory = getOutputDirectory();\n        project.addTestCompileSourceRoot(outputDirectory.getAbsolutePath());\n        buildContext.refresh(outputDirectory);\n    }\n\n    @Override\n    protected List<Artifact> getDependencyArtifacts() {\n        return project.getTestArtifacts();\n    }\n\n    @Override\n    protected File getProtoSourceRoot() {\n        return protoTestSourceRoot;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/MojoConfigurationException.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\n/**\n * An exception to indicate that plugin configuration was incorrect.\n *\n * @since 0.6.0\n */\npublic final class MojoConfigurationException extends RuntimeException {\n\n    private static final long serialVersionUID = 6662087467815362518L;\n\n    public MojoConfigurationException(final String message) {\n        super(message);\n    }\n\n    public MojoConfigurationException(final String message, final Throwable cause) {\n        super(message, cause);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/MojoInitializationException.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\n/**\n * An exception to indicate that plugin initialization has failed.\n *\n * @since 0.6.0\n */\npublic final class MojoInitializationException extends RuntimeException {\n\n    private static final long serialVersionUID = 821723854984670341L;\n\n    public MojoInitializationException(final String message) {\n        super(message);\n    }\n\n    public MojoInitializationException(final String message, final Throwable cause) {\n        super(message, cause);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/Protoc.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugin.logging.Log;\nimport org.codehaus.plexus.util.cli.CommandLineException;\nimport org.codehaus.plexus.util.cli.CommandLineUtils;\nimport org.codehaus.plexus.util.cli.CommandLineUtils.StringStreamConsumer;\nimport org.codehaus.plexus.util.cli.Commandline;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.PrintWriter;\nimport java.nio.charset.Charset;\nimport java.util.ArrayList;\nimport java.util.LinkedHashSet;\nimport java.util.List;\n\nimport static org.codehaus.plexus.util.StringUtils.join;\n\n/**\n * This class represents an invokable configuration of the {@code protoc} compiler.\n * The actual executable is invoked using the plexus {@link Commandline}.\n */\nfinal class Protoc {\n\n    /**\n     * Prefix for logging the debug messages.\n     */\n    public static final String LOG_PREFIX = \"[PROTOC] \";\n\n    /**\n     * Path to the {@code protoc} executable.\n     */\n    private final String executable;\n\n    /**\n     * A set of directories in which to search for definition imports.\n     */\n    private final List<File> protoPathElements;\n\n    /**\n     * A set of protobuf definitions to process.\n     */\n    private final List<File> protoFiles;\n\n    /**\n     * A directory into which Java source files will be generated.\n     */\n    private final File javaOutputDirectory;\n\n    private final List<ProtocPlugin> plugins;\n\n    private final File pluginDirectory;\n\n    private final String nativePluginId;\n\n    private final String nativePluginExecutable;\n\n    private final String nativePluginParameter;\n\n    /**\n     * A directory into which C++ source files will be generated.\n     */\n    private final File cppOutputDirectory;\n\n    /**\n     * A directory into which Python source files will be generated.\n     */\n    private final File pythonOutputDirectory;\n\n    /**\n     * A directory into which C# source files will be generated.\n     */\n    private final File csharpOutputDirectory;\n\n    /**\n     * A directory into which JavaScript source files will be generated.\n     */\n    private final File javaScriptOutputDirectory;\n\n    /**\n     *  A directory into which a custom protoc plugin will generate files.\n     */\n    private final File customOutputDirectory;\n\n    private final File descriptorSetFile;\n\n    private final boolean includeImportsInDescriptorSet;\n\n    private final boolean includeSourceInfoInDescriptorSet;\n\n    /**\n     * A buffer to consume standard output from the {@code protoc} executable.\n     */\n    private final StringStreamConsumer output;\n\n    /**\n     * A buffer to consume error output from the {@code protoc} executable.\n     */\n    private final StringStreamConsumer error;\n\n    /**\n     * A directory where temporary files will be generated.\n     */\n    private final File tempDirectory;\n\n    /**\n     * A boolean indicating if the parameters to protoc should be passed in an argument file.\n     */\n    private final boolean useArgumentFile;\n\n    /**\n     * Constructs a new instance. This should only be used by the {@link Builder}.\n     *\n     * @param executable path to the {@code protoc} executable.\n     * @param protoPath a set of directories in which to search for definition imports.\n     * @param protoFiles a set of protobuf definitions to process.\n     * @param javaOutputDirectory a directory into which Java source files will be generated.\n     * @param cppOutputDirectory a directory into which C++ source files will be generated.\n     * @param pythonOutputDirectory a directory into which Python source files will be generated.\n     * @param csharpOutputDirectory a directory into which C# source files will be generated.\n     * @param javaScriptOutputDirectory a directory into which JavaScript source files will be generated.\n     * @param customOutputDirectory a directory into which a custom protoc plugin will generate files.\n     * @param descriptorSetFile The directory into which a descriptor set will be generated;\n     *                          if {@code null}, no descriptor set will be written\n     * @param includeImportsInDescriptorSet If {@code true}, dependencies will be included in the descriptor set.\n     * @param includeSourceInfoInDescriptorSet If {@code true}, source code information will be included\n     *                                         in the descriptor set.\n     * @param plugins a set of java protoc plugins.\n     * @param pluginDirectory location of protoc plugins to be added to system path.\n     * @param nativePluginId a unique id of a native plugin.\n     * @param nativePluginExecutable path to the native plugin executable.\n     * @param nativePluginParameter an optional parameter for a native plugin.\n     * @param tempDirectory a directory where temporary files will be generated.\n     * @param useArgumentFile If {@code true}, parameters to protoc will be put in an argument file\n     */\n    private Protoc(\n            final String executable,\n            final List<File> protoPath,\n            final List<File> protoFiles,\n            final File javaOutputDirectory,\n            final File cppOutputDirectory,\n            final File pythonOutputDirectory,\n            final File csharpOutputDirectory,\n            final File javaScriptOutputDirectory,\n            final File customOutputDirectory,\n            final File descriptorSetFile,\n            final boolean includeImportsInDescriptorSet,\n            final boolean includeSourceInfoInDescriptorSet,\n            final List<ProtocPlugin> plugins,\n            final File pluginDirectory,\n            final String nativePluginId,\n            final String nativePluginExecutable,\n            final String nativePluginParameter,\n            final File tempDirectory,\n            final boolean useArgumentFile\n    ) {\n        if (executable == null) {\n            throw new MojoConfigurationException(\"'executable' is null\");\n        }\n        if (protoPath == null) {\n            throw new MojoConfigurationException(\"'protoPath' is null\");\n        }\n        if (protoFiles == null) {\n            throw new MojoConfigurationException(\"'protoFiles' is null\");\n        }\n        this.executable = executable;\n        this.protoPathElements = protoPath;\n        this.protoFiles = protoFiles;\n        this.javaOutputDirectory = javaOutputDirectory;\n        this.cppOutputDirectory = cppOutputDirectory;\n        this.pythonOutputDirectory = pythonOutputDirectory;\n        this.csharpOutputDirectory = csharpOutputDirectory;\n        this.javaScriptOutputDirectory = javaScriptOutputDirectory;\n        this.customOutputDirectory = customOutputDirectory;\n        this.descriptorSetFile = descriptorSetFile;\n        this.includeImportsInDescriptorSet = includeImportsInDescriptorSet;\n        this.includeSourceInfoInDescriptorSet = includeSourceInfoInDescriptorSet;\n        this.plugins = plugins;\n        this.pluginDirectory = pluginDirectory;\n        this.nativePluginId = nativePluginId;\n        this.nativePluginExecutable = nativePluginExecutable;\n        this.nativePluginParameter = nativePluginParameter;\n        this.tempDirectory = tempDirectory;\n        this.useArgumentFile = useArgumentFile;\n        this.error = new StringStreamConsumer();\n        this.output = new StringStreamConsumer();\n    }\n\n    /**\n     * Invokes the {@code protoc} compiler using the configuration specified at construction.\n     *\n     * @param log logger instance.\n     * @return The exit status of {@code protoc}.\n     * @throws CommandLineException if command line environment cannot be set up.\n     * @throws InterruptedException if the execution was interrupted by the user.\n     */\n    public int execute(final Log log) throws CommandLineException, InterruptedException {\n        final Commandline cl = new Commandline();\n        cl.setExecutable(executable);\n        String[] args = buildProtocCommand().toArray(new String[] {});\n        if (useArgumentFile) {\n            try {\n                File argumentsFile = createFileWithArguments(args);\n                log.debug(LOG_PREFIX + \"Using arguments file \" + argumentsFile.getPath());\n                cl.addArguments(new String[] {\"@\" + argumentsFile.getAbsolutePath()});\n            } catch (final IOException e) {\n                throw new CommandLineException(\"Error creating file with protoc arguments\", e);\n            }\n        } else {\n            cl.addArguments(args);\n        }\n        // There is a race condition in JDK that may sporadically prevent process creation on Linux\n        // https://bugs.openjdk.java.net/browse/JDK-8068370\n        // In order to mitigate that, retry up to 2 more times before giving up\n        int attemptsLeft = 3;\n        while (true) {\n            try {\n                return CommandLineUtils.executeCommandLine(cl, null, output, error);\n            } catch (CommandLineException e) {\n                if (--attemptsLeft == 0 || e.getCause() == null) {\n                    throw e;\n                }\n                log.warn(LOG_PREFIX + \"Unable to invoke protoc, will retry \" + attemptsLeft + \" time(s)\", e);\n                Thread.sleep(1000L);\n            }\n        }\n    }\n\n    /**\n     * Creates the command line arguments.\n     *\n     * <p>This method has been made visible for testing only.</p>\n     *\n     * @return A list consisting of the executable followed by any arguments.\n     */\n    public List<String> buildProtocCommand() {\n        final List<String> command = new ArrayList<>();\n        // add the executable\n        for (final File protoPathElement : protoPathElements) {\n            command.add(\"--proto_path=\" + protoPathElement);\n        }\n        if (javaOutputDirectory != null) {\n            String outputOption = \"--java_out=\";\n            if (nativePluginParameter != null) {\n                outputOption += nativePluginParameter + ':';\n            }\n            outputOption += javaOutputDirectory;\n            command.add(outputOption);\n\n            // For now we assume all custom plugins produce Java output\n            for (final ProtocPlugin plugin : plugins) {\n                final File pluginExecutable = plugin.getPluginExecutableFile(pluginDirectory);\n                command.add(\"--plugin=protoc-gen-\" + plugin.getId() + '=' + pluginExecutable);\n                command.add(\"--\" + plugin.getId() + \"_out=\" + javaOutputDirectory);\n            }\n        }\n        if (cppOutputDirectory != null) {\n            command.add(\"--cpp_out=\" + cppOutputDirectory);\n        }\n        if (pythonOutputDirectory != null) {\n            command.add(\"--python_out=\" + pythonOutputDirectory);\n        }\n        if (csharpOutputDirectory != null) {\n            command.add(\"--csharp_out=\" + csharpOutputDirectory);\n        }\n        if (javaScriptOutputDirectory != null) {\n            String outputOption = \"--js_out=\";\n            if (nativePluginParameter != null) {\n                outputOption += nativePluginParameter + ':';\n            }\n            outputOption += javaScriptOutputDirectory;\n            command.add(outputOption);\n        }\n        if (customOutputDirectory != null) {\n            if (nativePluginExecutable != null) {\n                command.add(\"--plugin=protoc-gen-\" + nativePluginId + '=' + nativePluginExecutable);\n            }\n\n            String outputOption = \"--\" + nativePluginId + \"_out=\";\n            if (nativePluginParameter != null) {\n                outputOption += nativePluginParameter + ':';\n            }\n            outputOption += customOutputDirectory;\n            command.add(outputOption);\n        }\n        for (final File protoFile : protoFiles) {\n            command.add(protoFile.toString());\n        }\n        if (descriptorSetFile != null) {\n            command.add(\"--descriptor_set_out=\" + descriptorSetFile);\n            if (includeImportsInDescriptorSet) {\n                command.add(\"--include_imports\");\n            }\n            if (includeSourceInfoInDescriptorSet) {\n                command.add(\"--include_source_info\");\n            }\n        }\n        return command;\n    }\n\n    /**\n     * Logs execution parameters on debug level to the specified logger.\n     * All log messages will be prefixed with {@value #LOG_PREFIX}.\n     *\n     * @param log a logger.\n     */\n    public void logExecutionParameters(final Log log) {\n        if (log.isDebugEnabled()) {\n            log.debug(LOG_PREFIX + \"Executable: \");\n            log.debug(LOG_PREFIX + ' ' + executable);\n\n            if (protoPathElements != null && !protoPathElements.isEmpty()) {\n                log.debug(LOG_PREFIX + \"Protobuf import paths:\");\n                for (final File protoPathElement : protoPathElements) {\n                    log.debug(LOG_PREFIX + ' ' + protoPathElement);\n                }\n            }\n\n            if (javaOutputDirectory != null) {\n                log.debug(LOG_PREFIX + \"Java output directory:\");\n                log.debug(LOG_PREFIX + ' ' + javaOutputDirectory);\n\n                if (plugins.size() > 0) {\n                    log.debug(LOG_PREFIX + \"Plugins for Java output:\");\n                    for (final ProtocPlugin plugin : plugins) {\n                        log.debug(LOG_PREFIX + ' ' + plugin.getId());\n                    }\n                }\n            }\n\n            if (pluginDirectory != null) {\n                log.debug(LOG_PREFIX + \"Plugin directory:\");\n                log.debug(LOG_PREFIX + ' ' + pluginDirectory);\n            }\n\n            if (cppOutputDirectory != null) {\n                log.debug(LOG_PREFIX + \"C++ output directory:\");\n                log.debug(LOG_PREFIX + ' ' + cppOutputDirectory);\n            }\n            if (pythonOutputDirectory != null) {\n                log.debug(LOG_PREFIX + \"Python output directory:\");\n                log.debug(LOG_PREFIX + ' ' + pythonOutputDirectory);\n            }\n            if (csharpOutputDirectory != null) {\n                log.debug(LOG_PREFIX + \"C# output directory:\");\n                log.debug(LOG_PREFIX + ' ' + csharpOutputDirectory);\n            }\n            if (javaScriptOutputDirectory != null) {\n                log.debug(LOG_PREFIX + \"JavaScript output directory:\");\n                log.debug(LOG_PREFIX + ' ' + javaScriptOutputDirectory);\n            }\n\n            if (descriptorSetFile != null) {\n                log.debug(LOG_PREFIX + \"Descriptor set output file:\");\n                log.debug(LOG_PREFIX + ' ' + descriptorSetFile);\n                log.debug(LOG_PREFIX + \"Include imports:\");\n                log.debug(LOG_PREFIX + ' ' + includeImportsInDescriptorSet);\n            }\n\n            log.debug(LOG_PREFIX + \"Protobuf descriptors:\");\n            for (final File protoFile : protoFiles) {\n                log.debug(LOG_PREFIX + ' ' + protoFile);\n            }\n\n            final List<String> cl = buildProtocCommand();\n            if (cl != null && !cl.isEmpty()) {\n                log.debug(LOG_PREFIX + \"Command line options:\");\n                log.debug(LOG_PREFIX + join(cl.iterator(), \" \"));\n            }\n        }\n    }\n\n    /**\n     * @return the output\n     */\n    public String getOutput() {\n        return fixUnicodeOutput(output.getOutput());\n    }\n\n    /**\n     * @return the error\n     */\n    public String getError() {\n        return fixUnicodeOutput(error.getOutput());\n    }\n\n    /**\n     * Transcodes the output from system default charset to UTF-8.\n     * Protoc emits messages in UTF-8, but they are captured into a stream that has a system-default encoding.\n     *\n     * @param message a UTF-8 message in system-default encoding.\n     * @return the same message converted into a unicode string.\n     */\n    private static String fixUnicodeOutput(final String message) {\n        return new String(message.getBytes(), Charset.forName(\"UTF-8\"));\n    }\n\n    /**\n     * Put args into a temp file to be referenced using the @ option in protoc command line.\n     *\n     * @param args\n     * @return the temporary file wth the arguments\n     * @throws IOException\n     */\n    private File createFileWithArguments(String... args) throws IOException {\n        PrintWriter writer = null;\n        try {\n            final File tempFile = File.createTempFile(\"protoc\", null, tempDirectory);\n            tempFile.deleteOnExit();\n\n            writer = new PrintWriter(tempFile, \"UTF-8\");\n            for (final String arg : args) {\n                writer.println(arg);\n            }\n            writer.flush();\n\n            return tempFile;\n        } finally {\n            if (writer != null) {\n                writer.close();\n            }\n        }\n    }\n\n    /**\n     * This class builds {@link Protoc} instances.\n     */\n    static final class Builder {\n\n        /**\n         * Path to the {@code protoc} executable.\n         */\n        private final String executable;\n\n        private final LinkedHashSet<File> protopathElements;\n\n        private final List<File> protoFiles;\n\n        private final List<ProtocPlugin> plugins;\n\n        private File tempDirectory;\n\n        private File pluginDirectory;\n\n        // TODO reorganise support for custom plugins\n        // This place is currently a mess because of the two different type of custom plugins supported:\n        // pure java (wrapped in a native launcher) and binary native.\n\n        private String nativePluginId;\n\n        private String nativePluginExecutable;\n\n        private String nativePluginParameter;\n\n        /**\n         * A directory into which Java source files will be generated.\n         */\n        private File javaOutputDirectory;\n\n        /**\n         * A directory into which C++ source files will be generated.\n         */\n        private File cppOutputDirectory;\n\n        /**\n         * A directory into which Python source files will be generated.\n         */\n        private File pythonOutputDirectory;\n\n        /**\n         * A directory into which C# source files will be generated.\n         */\n        private File csharpOutputDirectory;\n\n        /**\n         * A directory into which JavaScript source files will be generated.\n         */\n        private File javaScriptOutputDirectory;\n\n        /**\n         * A directory into which a custom protoc plugin will generate files.\n         */\n        private File customOutputDirectory;\n\n        private File descriptorSetFile;\n\n        private boolean includeImportsInDescriptorSet;\n\n        private boolean includeSourceInfoInDescriptorSet;\n\n        private boolean useArgumentFile;\n\n        /**\n         * Constructs a new builder.\n         *\n         * @param executable The path to the {@code protoc} executable.\n         */\n        Builder(final String executable) {\n            if (executable == null) {\n                throw new MojoConfigurationException(\"'executable' is null\");\n            }\n            this.executable = executable;\n            protoFiles = new ArrayList<>();\n            protopathElements = new LinkedHashSet<>();\n            plugins = new ArrayList<>();\n        }\n\n        public Builder setTempDirectory(final File tempDirectory) {\n            if (tempDirectory == null) {\n                throw new MojoConfigurationException(\"'tempDirectory' is null\");\n            }\n            if (!tempDirectory.isDirectory()) {\n                throw new MojoConfigurationException(\n                        \"'tempDirectory' is not a directory: \" + tempDirectory.getAbsolutePath());\n            }\n            this.tempDirectory = tempDirectory;\n            return this;\n        }\n\n        /**\n         * Sets the directory into which Java source files will be generated.\n         *\n         * @param javaOutputDirectory a directory into which Java source files will be generated.\n         * @return this builder instance.\n         */\n        public Builder setJavaOutputDirectory(final File javaOutputDirectory) {\n            if (javaOutputDirectory == null) {\n                throw new MojoConfigurationException(\"'javaOutputDirectory' is null\");\n            }\n            if (!javaOutputDirectory.isDirectory()) {\n                throw new MojoConfigurationException(\n                        \"'javaOutputDirectory' is not a directory: \" + javaOutputDirectory.getAbsolutePath());\n            }\n            this.javaOutputDirectory = javaOutputDirectory;\n            return this;\n        }\n\n        /**\n         * Sets the directory into which C++ source files will be generated.\n         *\n         * @param cppOutputDirectory a directory into which C++ source files will be generated.\n         * @return this builder instance.\n         */\n        public Builder setCppOutputDirectory(final File cppOutputDirectory) {\n            if (cppOutputDirectory == null) {\n                throw new MojoConfigurationException(\"'cppOutputDirectory' is null\");\n            }\n            if (!cppOutputDirectory.isDirectory()) {\n                throw new MojoConfigurationException(\n                        \"'cppOutputDirectory' is not a directory: \" + cppOutputDirectory.getAbsolutePath());\n            }\n            this.cppOutputDirectory = cppOutputDirectory;\n            return this;\n        }\n\n        /**\n         * Sets the directory into which Python source files will be generated.\n         *\n         * @param pythonOutputDirectory a directory into which Python source files will be generated.\n         * @return this builder instance.\n         */\n        public Builder setPythonOutputDirectory(final File pythonOutputDirectory) {\n            if (pythonOutputDirectory == null) {\n                throw new MojoConfigurationException(\"'pythonOutputDirectory' is null\");\n            }\n            if (!pythonOutputDirectory.isDirectory()) {\n                throw new MojoConfigurationException(\n                        \"'pythonOutputDirectory' is not a directory: \" + pythonOutputDirectory.getAbsolutePath());\n            }\n            this.pythonOutputDirectory = pythonOutputDirectory;\n            return this;\n        }\n\n        /**\n         * Sets the directory into which C# source files will be generated.\n         *\n         * @param csharpOutputDirectory a directory into which C# source files will be generated.\n         * @return this builder instance.\n         */\n        public Builder setCsharpOutputDirectory(final File csharpOutputDirectory) {\n            if (csharpOutputDirectory == null) {\n                throw new MojoConfigurationException(\"'csharpOutputDirectory' is null\");\n            }\n            if (!csharpOutputDirectory.isDirectory()) {\n                throw new MojoConfigurationException(\n                        \"'csharpOutputDirectory' is not a directory: \" + csharpOutputDirectory.getAbsolutePath());\n            }\n            this.csharpOutputDirectory = csharpOutputDirectory;\n            return this;\n        }\n\n        /**\n         * Sets the directory into which JavaScript source files will be generated.\n         *\n         * @param javaScriptOutputDirectory a directory into which JavaScript source files will be generated.\n         * @return this builder instance.\n         */\n        public Builder setJavaScriptOutputDirectory(final File javaScriptOutputDirectory) {\n            if (javaScriptOutputDirectory == null) {\n                throw new MojoConfigurationException(\"'javaScriptOutputDirectory' is null\");\n            }\n            if (!javaScriptOutputDirectory.isDirectory()) {\n                throw new MojoConfigurationException(\n                        \"'javaScriptOutputDirectory' is not a directory: \"\n                                + javaScriptOutputDirectory.getAbsolutePath());\n            }\n            this.javaScriptOutputDirectory = javaScriptOutputDirectory;\n            return this;\n        }\n\n        /**\n         * Sets the directory into which a custom protoc plugin will generate files.\n         *\n         * @param customOutputDirectory a directory into which a custom protoc plugin will generate files.\n         * @return this builder instance.\n         */\n        public Builder setCustomOutputDirectory(final File customOutputDirectory) {\n            if (customOutputDirectory == null) {\n                throw new MojoConfigurationException(\"'customOutputDirectory' is null\");\n            }\n            if (!customOutputDirectory.isDirectory()) {\n                throw new MojoConfigurationException(\n                        \"'customOutputDirectory' is not a directory: \" + customOutputDirectory.getAbsolutePath());\n            }\n            this.customOutputDirectory = customOutputDirectory;\n            return this;\n        }\n\n        /**\n         * Adds a proto file to be compiled. Proto files must be on the protopath\n         * and this method will fail if a proto file is added without first adding a\n         * parent directory to the protopath.\n         *\n         * @param protoFile source protobuf definitions file.\n         * @return The builder.\n         */\n        public Builder addProtoFile(final File protoFile) {\n            if (protoFile == null) {\n                throw new MojoConfigurationException(\"'protoFile' is null\");\n            }\n            if (!protoFile.isFile()) {\n                throw new MojoConfigurationException(\"Proto file is not a file: \" + protoFile.getAbsolutePath());\n            }\n            checkProtoFileIsInProtopath(protoFile);\n            protoFiles.add(protoFile);\n            return this;\n        }\n\n        /**\n         * Adds a protoc plugin definition for custom code generation.\n         * @param plugin plugin definition\n         * @return this builder instance.\n         */\n        public Builder addPlugin(final ProtocPlugin plugin) {\n            if (plugin == null) {\n                throw new MojoConfigurationException(\"'plugin' is null\");\n            }\n            plugins.add(plugin);\n            return this;\n        }\n\n        public Builder setPluginDirectory(final File pluginDirectory) {\n            if (pluginDirectory == null) {\n                throw new MojoConfigurationException(\"'pluginDirectory' is null\");\n            }\n            if (!pluginDirectory.isDirectory()) {\n                throw new MojoConfigurationException(\n                        \"'pluginDirectory' is not a directory: \" + pluginDirectory.getAbsolutePath());\n            }\n            this.pluginDirectory = pluginDirectory;\n            return this;\n        }\n\n        public Builder setNativePluginId(final String nativePluginId) {\n            if (nativePluginId == null || nativePluginId.isEmpty()) {\n                throw new MojoConfigurationException(\"'nativePluginId' is null or empty\");\n            }\n            if (nativePluginId.equals(\"java\")\n                    || nativePluginId.equals(\"js\")\n                    || nativePluginId.equals(\"python\")\n                    || nativePluginId.equals(\"csharp\")\n                    || nativePluginId.equals(\"cpp\")\n                    || nativePluginId.equals(\"descriptor_set\")) {\n                throw new MojoConfigurationException(\"'nativePluginId' matches one of the built-in \"\n                        + \"protoc plugins: \" + nativePluginId);\n            }\n            this.nativePluginId = nativePluginId;\n            return this;\n        }\n\n        public Builder setNativePluginExecutable(final String nativePluginExecutable) {\n            if (nativePluginExecutable == null || nativePluginExecutable.isEmpty()) {\n                throw new MojoConfigurationException(\"'nativePluginExecutable' is null or empty\");\n            }\n            this.nativePluginExecutable = nativePluginExecutable;\n            return this;\n        }\n\n        public Builder setNativePluginParameter(final String nativePluginParameter) {\n            if (nativePluginParameter == null) {\n                throw new MojoConfigurationException(\"'nativePluginParameter' is null\");\n            }\n            if (nativePluginParameter.contains(\":\")) {\n                throw new MojoConfigurationException(\"'nativePluginParameter' contains illegal characters\");\n            }\n            this.nativePluginParameter = nativePluginParameter;\n            return this;\n        }\n\n        public Builder withDescriptorSetFile(\n                final File descriptorSetFile,\n                final boolean includeImports,\n                final boolean includeSourceInfoInDescriptorSet\n        ) {\n            if (descriptorSetFile == null) {\n                throw new MojoConfigurationException(\"'descriptorSetFile' is null\");\n            }\n            final File descriptorSetFileParent = descriptorSetFile.getParentFile();\n            if (!descriptorSetFileParent.exists()) {\n                throw new MojoConfigurationException(\"Parent directory for 'descriptorSetFile' does not exist\");\n            }\n            if (!descriptorSetFileParent.isDirectory()) {\n                throw new MojoConfigurationException(\"Parent for 'descriptorSetFile' is not a directory\");\n            }\n            this.descriptorSetFile = descriptorSetFile;\n            this.includeImportsInDescriptorSet = includeImports;\n            this.includeSourceInfoInDescriptorSet = includeSourceInfoInDescriptorSet;\n            return this;\n        }\n\n        public Builder useArgumentFile(final boolean useArgumentFile) {\n            this.useArgumentFile = useArgumentFile;\n            return this;\n        }\n\n        private void checkProtoFileIsInProtopath(final File protoFile) {\n            if (!protoFile.isFile()) {\n                throw new MojoConfigurationException(\"Not a regular file: \" + protoFile.getAbsolutePath());\n            }\n            if (!checkProtoFileIsInProtopathHelper(protoFile.getParentFile())) {\n                throw new MojoConfigurationException(\"File is not in proto path: \" + protoFile.getAbsolutePath());\n            }\n        }\n\n        private boolean checkProtoFileIsInProtopathHelper(final File directory) {\n            if (!directory.isDirectory()) {\n                throw new MojoConfigurationException(\"Not a directory: \" + directory.getAbsolutePath());\n            }\n            if (protopathElements.contains(directory)) {\n                return true;\n            }\n            final File parentDirectory = directory.getParentFile();\n            return parentDirectory != null && checkProtoFileIsInProtopathHelper(parentDirectory);\n        }\n\n        /**\n         * Adds a collection of proto files to be compiled.\n         *\n         * @param protoFiles a collection of source protobuf definition files.\n         * @return this builder instance.\n         * @see #addProtoFile(File)\n         */\n        public Builder addProtoFiles(final Iterable<File> protoFiles) {\n            for (final File protoFile : protoFiles) {\n                addProtoFile(protoFile);\n            }\n            return this;\n        }\n\n        /**\n         * Adds the {@code protopathElement} to the protopath.\n         *\n         * @param protopathElement A directory to be searched for imported protocol buffer definitions.\n         * @return The builder.\n         */\n        public Builder addProtoPathElement(final File protopathElement) {\n            if (protopathElement == null) {\n                throw new MojoConfigurationException(\"'protopathElement' is null\");\n            }\n            if (!protopathElement.isDirectory()) {\n                throw new MojoConfigurationException(\n                        \"Proto path element is not a directory: \" + protopathElement.getAbsolutePath());\n            }\n            protopathElements.add(protopathElement);\n            return this;\n        }\n\n        /**\n         * Adds a number of elements to the protopath.\n         *\n         * @param protopathElements directories to be searched for imported protocol buffer definitions.\n         * @return this builder instance.\n         * @see #addProtoPathElement(File)\n         */\n        public Builder addProtoPathElements(final Iterable<File> protopathElements) {\n            for (final File protopathElement : protopathElements) {\n                addProtoPathElement(protopathElement);\n            }\n            return this;\n        }\n\n        /**\n         * Validates the internal state for consistency and completeness.\n         */\n        private void validateState() {\n            if (protoFiles.isEmpty()) {\n                throw new MojoConfigurationException(\"No proto files specified\");\n            }\n            if (javaOutputDirectory == null\n                    && cppOutputDirectory == null\n                    && pythonOutputDirectory == null\n                    && csharpOutputDirectory == null\n                    && javaScriptOutputDirectory == null\n                    && customOutputDirectory == null\n                    && descriptorSetFile == null) {\n                throw new MojoConfigurationException(\"At least one of these properties must be set:\" +\n                        \" 'javaOutputDirectory', 'cppOutputDirectory',\" +\n                        \" 'pythonOutputDirectory', 'csharpOutputDirectory', 'javaScriptOutputDirectory',\" +\n                        \" 'customOutputDirectory', or 'descriptorSetFile'\");\n            }\n        }\n\n        /**\n         * Builds and returns a fully configured instance of {@link Protoc} wrapper.\n         *\n         * @return a configured {@link Protoc} instance.\n         */\n        public Protoc build() {\n            validateState();\n            return new Protoc(\n                    executable,\n                    new ArrayList<>(protopathElements),\n                    protoFiles,\n                    javaOutputDirectory,\n                    cppOutputDirectory,\n                    pythonOutputDirectory,\n                    csharpOutputDirectory,\n                    javaScriptOutputDirectory,\n                    customOutputDirectory,\n                    descriptorSetFile,\n                    includeImportsInDescriptorSet,\n                    includeSourceInfoInDescriptorSet,\n                    plugins,\n                    pluginDirectory,\n                    nativePluginId,\n                    nativePluginExecutable,\n                    nativePluginParameter,\n                    tempDirectory,\n                    useArgumentFile);\n        }\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocCompileCppMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport java.io.File;\n\n/**\n * This mojo executes the {@code protoc} compiler for generating main C++ sources\n * from protocol buffer definitions. It also searches dependency artifacts for\n * {@code .proto} files and includes them in the {@code proto_path} so that they can be\n * referenced. Finally, it adds the {@code .proto} files to the project as resources so\n * that they are included in the final artifact.\n *\n * @since 0.3.3\n */\n@Mojo(\n        name = \"compile-cpp\",\n        defaultPhase = LifecyclePhase.GENERATE_SOURCES,\n        requiresDependencyResolution = ResolutionScope.COMPILE,\n        threadSafe = true\n)\npublic final class ProtocCompileCppMojo extends AbstractProtocCompileMojo {\n\n    /**\n     * This is the directory into which the {@code .cpp} will be created.\n     */\n    @Parameter(\n            required = true,\n            property = \"cppOutputDirectory\",\n            defaultValue = \"${project.build.directory}/generated-sources/protobuf/cpp\"\n    )\n    private File outputDirectory;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n        protocBuilder.setCppOutputDirectory(getOutputDirectory());\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        return outputDirectory;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocCompileCsharpMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport java.io.File;\n\n/**\n * This mojo executes the {@code protoc} compiler for generating main C# sources\n * from protocol buffer definitions. It also searches dependency artifacts for\n * {@code .proto} files and includes them in the {@code proto_path} so that they can be\n * referenced. Finally, it adds the {@code .proto} files to the project as resources so\n * that they are included in the final artifact.\n *\n * @since 0.6.0\n */\n@Mojo(\n        name = \"compile-csharp\",\n        defaultPhase = LifecyclePhase.GENERATE_SOURCES,\n        requiresDependencyResolution = ResolutionScope.COMPILE,\n        threadSafe = true\n)\npublic final class ProtocCompileCsharpMojo extends AbstractProtocCompileMojo {\n\n    /**\n     * This is the directory into which the {@code .cs} will be created.\n     */\n    @Parameter(\n            required = true,\n            property = \"csharpOutputDirectory\",\n            defaultValue = \"${project.build.directory}/generated-sources/protobuf/csharp\"\n    )\n    private File outputDirectory;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n        protocBuilder.setCsharpOutputDirectory(getOutputDirectory());\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        return outputDirectory;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocCompileCustomMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\nimport org.apache.maven.toolchain.Toolchain;\n\nimport java.io.File;\n\n/**\n * This mojo executes the {@code protoc} compiler with the specified plugin\n * executable to generate main sources from protocol buffer definitions.\n * It also searches dependency artifacts for {@code .proto} files and\n * includes them in the {@code proto_path} so that they can be referenced.\n * Finally, it adds the {@code .proto} files to the project as resources so\n * that they are included in the final artifact.\n *\n * @since 0.4.1\n */\n@Mojo(\n        name = \"compile-custom\",\n        defaultPhase = LifecyclePhase.GENERATE_SOURCES,\n        requiresDependencyResolution = ResolutionScope.COMPILE,\n        threadSafe = true\n)\npublic final class ProtocCompileCustomMojo extends AbstractProtocCompileMojo {\n\n    /**\n     * A unique id that identifies the plugin to protoc.\n     * <strong>Cannot</strong> be one of the built-in protoc plugins:\n     * <ul>\n     *     <li>java</li>\n     *     <li>js</li>\n     *     <li>csharp</li>\n     *     <li>cpp</li>\n     *     <li>python</li>\n     *     <li>descriptor-set</li>\n     * </ul>\n     */\n    @Parameter(\n            required = true,\n            property = \"protocPluginId\"\n    )\n    private String pluginId;\n\n    /**\n     * This is the base directory for the generated code.\n     * If an explicit {@link #outputDirectory} parameter is not specified,\n     * an output directory named after {@link #pluginId} will be created\n     * inside this base directory.\n     */\n    @Parameter(\n            required = true,\n            readonly = true,\n            defaultValue = \"${project.build.directory}/generated-sources/protobuf\"\n    )\n    private File outputBaseDirectory;\n\n    /**\n     * This is the directory where the generated code will be placed.\n     * If this parameter is unspecified, then the default location is constructed as follows:<br>\n     * <code>${project.build.directory}/generated-sources/protobuf/&lt;pluginId&gt;</code>\n     */\n    @Parameter(\n            required = false,\n            property = \"protocPluginOutputDirectory\"\n    )\n    private File outputDirectory;\n\n    /**\n     * An optional path to plugin executable.\n     * If unspecified, alternative options must be used (e.g. toolchains).\n     */\n    @Parameter(\n            required = false,\n            property = \"protocPluginExecutable\"\n    )\n    private String pluginExecutable;\n\n    /**\n     * An optional parameter to be passed to the plugin.\n     * <b>Cannot</b> contain colon (<tt>:</tt>) symbols.\n     */\n    @Parameter(\n            required = false,\n            property = \"protocPluginParameter\"\n    )\n    private String pluginParameter;\n\n    /**\n     * A name of an optional custom toolchain that can be used to locate the plugin executable.\n     * The toolchain must be registered as a build extension and initialised properly.\n     */\n    @Parameter(\n            required = false,\n            property = \"protocPluginToolchain\"\n    )\n    private String pluginToolchain;\n\n    /**\n     * If {@link #pluginToolchain} is specified, this parameter specifies the tool in the toolchain,\n     * which is to be resolved as plugin executable.\n     */\n    @Parameter(\n            required = false,\n            property = \"protocPluginTool\"\n    )\n    private String pluginTool;\n\n    /**\n     * Plugin artifact specification, in {@code groupId:artifactId:version[:type[:classifier]]} format.\n     * When this parameter is set, the specified artifact will be resolved as a plugin executable.\n     *\n     * @since 0.4.1\n     */\n    @Parameter(\n            required = false,\n            property = \"protocPluginArtifact\"\n    )\n    private String pluginArtifact;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n\n        protocBuilder.setNativePluginId(pluginId);\n        if (pluginToolchain != null && pluginTool != null) {\n            //get toolchain from context\n            final Toolchain tc = toolchainManager.getToolchainFromBuildContext(pluginToolchain, session);\n            if (tc != null) {\n                getLog().info(\"Toolchain in protobuf-maven-plugin: \" + tc);\n                //when the executable to use is explicitly set by user in mojo's parameter, ignore toolchains.\n                if (pluginExecutable != null) {\n                    getLog().warn(\"Toolchains are ignored, 'pluginExecutable' parameter is set to \" + pluginExecutable);\n                } else {\n                    //assign the path to executable from toolchains\n                    pluginExecutable = tc.findTool(pluginTool);\n                }\n            }\n        }\n        if (pluginExecutable == null && pluginArtifact != null) {\n            final Artifact artifact = createDependencyArtifact(pluginArtifact);\n            final File file = resolveBinaryArtifact(artifact);\n            pluginExecutable = file.getAbsolutePath();\n        }\n        if (pluginExecutable != null) {\n            protocBuilder.setNativePluginExecutable(pluginExecutable);\n        }\n        if (pluginParameter != null) {\n            protocBuilder.setNativePluginParameter(pluginParameter);\n        }\n        protocBuilder.setCustomOutputDirectory(getOutputDirectory());\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        File outputDirectory = this.outputDirectory;\n        if (outputDirectory == null) {\n            outputDirectory = new File(outputBaseDirectory, pluginId);\n        }\n        return outputDirectory;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocCompileDescriptorSetMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport java.io.File;\n\n/**\n * This mojo executes {@code protoc} compiler for generating descriptor sets\n * from protocol buffer definitions. It also searches dependency artifacts for\n * {@code .proto} files and includes them in the {@code proto_path} so that they can be\n * referenced. Finally, it adds the {@code .proto} files to the project as resources so\n * that they are included in the final artifact. The generated descriptor set can be\n * optionally also attached to the project.\n *\n * @since 0.7.0\n */\n@Mojo(\n        name = \"compile-descriptor-set\",\n        defaultPhase = LifecyclePhase.GENERATE_RESOURCES,\n        requiresDependencyResolution = ResolutionScope.COMPILE,\n        threadSafe = true\n)\npublic final class ProtocCompileDescriptorSetMojo extends AbstractProtocCompileMojo {\n\n    /**\n     * This is the directory into which the descriptor set file will be created.\n     */\n    @Parameter(\n            required = true,\n            property = \"descriptorSetOutputDirectory\",\n            defaultValue = \"${project.build.directory}/generated-resources/protobuf/descriptor-sets\"\n    )\n    private File outputDirectory;\n\n    /**\n     * The descriptor set file name.\n     */\n    @Parameter(\n            required = true,\n            defaultValue = \"${project.build.finalName}.pb\"\n    )\n    protected String descriptorSetFileName;\n\n    /**\n     * If set to {@code true}, the generated descriptor set will be attached to the build.\n     */\n    @Parameter(\n            required = true,\n            defaultValue = \"false\"\n    )\n    protected boolean attach;\n\n    /**\n     * If generated descriptor set is to be attached to the build, specifies an optional classifier.\n     */\n    @Parameter(\n            required = false\n    )\n    protected String classifier;\n\n    /**\n     * If {@code true}, the compiler will include all dependencies in the descriptor set, making it self-contained.\n     */\n    @Parameter(\n            required = false,\n            defaultValue = \"false\"\n    )\n    protected boolean includeImports;\n\n    /**\n     * If {@code true}, do not strip {@code SourceCodeInfo} from the {@code FileDescriptorProto}.\n     * This results in significantly larger descriptors that include information about the original location\n     * of each declaration in the source file, as well as surrounding comments.\n     */\n    @Parameter(\n            required = false,\n            defaultValue = \"false\"\n    )\n    protected boolean includeSourceInfo;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n        final File descriptorSetFile = new File(getOutputDirectory(), descriptorSetFileName);\n        getLog().info(\"Will generate descriptor set:\");\n        getLog().info(\" \" + descriptorSetFile.getAbsolutePath());\n        protocBuilder.withDescriptorSetFile(descriptorSetFile, includeImports, includeSourceInfo);\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        return outputDirectory;\n    }\n\n    @SuppressWarnings(\"MethodDoesntCallSuperMethod\")\n    @Override\n    protected void doAttachGeneratedFiles() {\n        final File outputDirectory = getOutputDirectory();\n        if (attach) {\n            final File descriptorSetFile = new File(getOutputDirectory(), descriptorSetFileName);\n            projectHelper.attachArtifact(project, \"pb\", classifier, descriptorSetFile);\n        }\n        buildContext.refresh(outputDirectory);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocCompileJavaScriptMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport java.io.File;\n\n/**\n * This mojo executes the {@code protoc} compiler for generating main JavaScript sources\n * from protocol buffer definitions. It also searches dependency artifacts for\n * {@code .proto} files and includes them in the {@code proto_path} so that they can be\n * referenced. Finally, it adds the {@code .proto} files to the project as resources so\n * that they are included in the final artifact.\n *\n * @since 0.6.0\n */\n@Mojo(\n        name = \"compile-js\",\n        defaultPhase = LifecyclePhase.GENERATE_SOURCES,\n        requiresDependencyResolution = ResolutionScope.COMPILE,\n        threadSafe = true\n)\npublic final class ProtocCompileJavaScriptMojo extends AbstractProtocCompileMojo {\n\n    /**\n     * This is the directory into which the {@code .js} will be created.\n     */\n    @Parameter(\n            required = true,\n            property = \"javaScriptOutputDirectory\",\n            defaultValue = \"${project.build.directory}/generated-sources/protobuf/js\"\n    )\n    private File outputDirectory;\n\n    /**\n     * Additional comma-separated options to be passed to the JavaScript generator.\n     * <b>Cannot</b> contain colon (<tt>:</tt>) symbols.\n     */\n    @Parameter(\n            required = false,\n            property = \"javaScriptOptions\"\n    )\n    private String javaScriptOptions;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n        if (javaScriptOptions != null) {\n            protocBuilder.setNativePluginParameter(javaScriptOptions);\n        }\n        protocBuilder.setJavaScriptOutputDirectory(getOutputDirectory());\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        return outputDirectory;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocCompileMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport java.io.File;\n\n/**\n * This mojo executes the {@code protoc} compiler for generating main Java sources\n * from protocol buffer definitions. It also searches dependency artifacts for\n * {@code .proto} files and includes them in the {@code proto_path} so that they can be\n * referenced. Finally, it adds the {@code .proto} files to the project as resources so\n * that they are included in the final artifact.\n */\n@Mojo(\n        name = \"compile\",\n        defaultPhase = LifecyclePhase.GENERATE_SOURCES,\n        requiresDependencyResolution = ResolutionScope.COMPILE,\n        threadSafe = true\n)\npublic final class ProtocCompileMojo extends AbstractProtocCompileMojo {\n\n    /**\n     * This is the directory into which the {@code .java} will be created.\n     */\n    @Parameter(\n            required = true,\n            property = \"javaOutputDirectory\",\n            defaultValue = \"${project.build.directory}/generated-sources/protobuf/java\"\n    )\n    private File outputDirectory;\n\n    /**\n     * Additional comma-separated options to be passed to the Java generator.\n     * <b>Cannot</b> contain colon (<tt>:</tt>) symbols.\n     *\n     * @since 0.7.0\n     */\n    @Parameter(\n            required = false,\n            property = \"javaOptions\"\n    )\n    private String javaOptions;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n        if (javaOptions != null) {\n            protocBuilder.setNativePluginParameter(javaOptions);\n        }\n        protocBuilder.setJavaOutputDirectory(getOutputDirectory());\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        return outputDirectory;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocCompilePythonMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport java.io.File;\n\n/**\n * This mojo executes the {@code protoc} compiler for generating main python sources\n * from protocol buffer definitions. It also searches dependency artifacts for\n * {@code .proto} files and includes them in the {@code proto_path} so that they can be\n * referenced. Finally, it adds the {@code .proto} files to the project as resources so\n * that they are included in the final artifact.\n *\n * @since 0.3.3\n */\n@Mojo(\n        name = \"compile-python\",\n        defaultPhase = LifecyclePhase.GENERATE_SOURCES,\n        requiresDependencyResolution = ResolutionScope.COMPILE,\n        threadSafe = true\n)\npublic final class ProtocCompilePythonMojo extends AbstractProtocCompileMojo {\n\n    /**\n     * This is the directory into which the {@code .py} will be created.\n     */\n    @Parameter(\n            required = true,\n            property = \"pythonOutputDirectory\",\n            defaultValue = \"${project.build.directory}/generated-sources/protobuf/python\"\n    )\n    private File outputDirectory;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n        protocBuilder.setPythonOutputDirectory(getOutputDirectory());\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        return outputDirectory;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocPlugin.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugin.logging.Log;\nimport org.codehaus.plexus.util.Os;\n\nimport java.io.File;\nimport java.util.List;\n\nimport static java.util.Collections.emptyList;\n\n/**\n * Describes a {@code protoc} plugin that is written in Java and\n * assembled from resolved artifacts at runtime.\n * The state is populated from the Maven plugin's configuration.\n *\n * @since 0.3.0\n */\npublic class ProtocPlugin {\n\n    private static final String DATA_MODEL_SYSPROP = \"sun.arch.data.model\";\n\n    private static final String WIN_JVM_DATA_MODEL_32 = \"32\";\n\n    private static final String WIN_JVM_DATA_MODEL_64 = \"64\";\n\n\n    private String id;\n\n    private String groupId;\n\n    private String artifactId;\n\n    private String version;\n\n    private String classifier;\n\n    private String mainClass;\n\n    private String javaHome;\n\n    // Assuming we're running a HotSpot JVM, use the data model of the\n    // current JVM as the default. This property is only relevant on\n    // Windows where we need to pick the right version of the WinRun4J executable.\n    private String winJvmDataModel;\n\n    private List<String> args;\n\n    private List<String> jvmArgs;\n\n    /**\n     * Returns the unique id for this plugin.\n     *\n     * @return the plugin's unique id.\n     */\n    public String getId() {\n        return id;\n    }\n\n    /**\n     * Returns group id of the plugin's artifact for dependency resolution.\n     *\n     * @return the plugin's group id.\n     */\n    public String getGroupId() {\n        return groupId;\n    }\n\n    /**\n     * Returns the plugin's artifact id for dependency resolution.\n     *\n     * @return the plugin's artifact id.\n     */\n    public String getArtifactId() {\n        return artifactId;\n    }\n\n    /**\n     * Returns the plugin's version specification for dependency resolution.\n     * This can be specified as either a single version or a version range.\n     *\n     * @return the plugin's version or version range.\n     */\n    public String getVersion() {\n        return version;\n    }\n\n    /**\n     * Returns an optional classifier of the plugin's artifact for dependency resolution.\n     *\n     * @return the plugin's artifact classifier.\n     */\n    public String getClassifier() {\n        return classifier;\n    }\n\n    /**\n     * Returns the plugin's Java main class to be execute by protoc.\n     *\n     * @return fully qualified name for the main class.\n     */\n    public String getMainClass() {\n        return mainClass;\n    }\n\n    /**\n     * Returns optional command line arguments to pass to the {@code main()} method.\n     *\n     * @return a list of command-line arguments.\n     */\n    public List<String> getArgs() {\n        return args != null ? args : emptyList();\n    }\n\n    /**\n     * Returns optional JVM options for plugin execution.\n     *\n     * @return a list of JVM options.\n     */\n    public List<String> getJvmArgs() {\n        return jvmArgs != null ? jvmArgs : emptyList();\n    }\n\n    public String getJavaHome() {\n        return javaHome;\n    }\n\n    public void setJavaHome(final String javaHome) {\n        this.javaHome = javaHome;\n    }\n\n    public String getWinJvmDataModel() {\n        return winJvmDataModel;\n    }\n\n    public String getPluginName() {\n        return \"protoc-gen-\" + id;\n    }\n\n    /**\n     * Validate the state of this plugin specification.\n     *\n     * @param log a logger instance for diagnostic output.\n     */\n    public void validate(final Log log) {\n        if (id == null) {\n            throw new MojoConfigurationException(\"id must be set in protocPlugin definition\");\n        }\n        if (groupId == null) {\n            throw new MojoConfigurationException(\"groupId must be set in protocPlugin definition\");\n        }\n        if (artifactId == null) {\n            throw new MojoConfigurationException(\"artifactId must be set in protocPlugin definition\");\n        }\n        if (version == null) {\n            throw new MojoConfigurationException(\"version must be set in protocPlugin definition\");\n        }\n        if (mainClass == null) {\n            throw new MojoConfigurationException(\"mainClass must be set in protocPlugin definition\");\n        }\n        if (javaHome == null || !new File(javaHome).isDirectory()) {\n            throw new MojoConfigurationException(\"javaHome is invalid: \" + javaHome);\n        }\n        if (Os.isFamily(Os.FAMILY_WINDOWS)) {\n\n            // If winJvmDataModel isn't set explicitly, try to guess the architecture\n            // by looking at the directories in the JDK/JRE javaHome points at.\n            // If that fails, try to figure out from the currently running JVM.\n\n            if (winJvmDataModel != null) {\n                if (!(winJvmDataModel.equals(WIN_JVM_DATA_MODEL_32) || winJvmDataModel.equals(WIN_JVM_DATA_MODEL_64))) {\n                    throw new MojoConfigurationException(\"winJvmDataModel must be '32' or '64'\");\n                }\n            } else if (archDirectoryExists(\"amd64\")) {\n                winJvmDataModel = WIN_JVM_DATA_MODEL_64;\n                if (log.isDebugEnabled()) {\n                    log.debug(\"detected 64-bit JVM from directory structure\");\n                }\n            } else if (archDirectoryExists(\"i386\")) {\n                winJvmDataModel = WIN_JVM_DATA_MODEL_32;\n                if (log.isDebugEnabled()) {\n                    log.debug(\"detected 32-bit JVM from directory structure\");\n                }\n            } else if (System.getProperty(DATA_MODEL_SYSPROP) != null) {\n                winJvmDataModel = System.getProperty(DATA_MODEL_SYSPROP);\n                if (log.isDebugEnabled()) {\n                    log.debug(\"detected \" + winJvmDataModel + \"-bit JVM from system property \" + DATA_MODEL_SYSPROP);\n                }\n            } else {\n                winJvmDataModel = WIN_JVM_DATA_MODEL_32;\n                if (log.isDebugEnabled()) {\n                    log.debug(\"defaulting to 32-bit JVM\");\n                }\n            }\n        }\n    }\n\n    private boolean archDirectoryExists(String arch) {\n        return javaHome != null\n                && (new File(javaHome, \"jre/lib/\" + arch).isDirectory()\n                || new File(javaHome, \"lib/\" + arch).isDirectory());\n    }\n\n    /**\n     * Returns the generated plugin executable path.\n     *\n     * @param pluginDirectory directory where plugins will be created\n     * @return file handle for the plugin executable.\n     */\n    public File getPluginExecutableFile(final File pluginDirectory) {\n        if (Os.isFamily(Os.FAMILY_WINDOWS)) {\n            return new File(pluginDirectory, getPluginName() + \".exe\");\n        } else {\n            return new File(pluginDirectory, getPluginName());\n        }\n    }\n\n    @Override\n    public String toString() {\n        return \"ProtocPlugin{\" +\n                \"id='\" + id + '\\'' +\n                \", groupId='\" + groupId + '\\'' +\n                \", artifactId='\" + artifactId + '\\'' +\n                \", version='\" + version + '\\'' +\n                \", classifier='\" + classifier + '\\'' +\n                \", mainClass='\" + mainClass + '\\'' +\n                \", javaHome='\" + javaHome + '\\'' +\n                \", winJvmDataModel='\" + winJvmDataModel + '\\'' +\n                \", args=\" + args +\n                \", jvmArgs=\" + jvmArgs +\n                '}';\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocPluginAssembler.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.artifact.factory.ArtifactFactory;\nimport org.apache.maven.artifact.repository.ArtifactRepository;\nimport org.apache.maven.artifact.resolver.ArtifactResolutionException;\nimport org.apache.maven.artifact.resolver.ArtifactResolutionRequest;\nimport org.apache.maven.artifact.resolver.ArtifactResolutionResult;\nimport org.apache.maven.artifact.resolver.ResolutionErrorHandler;\nimport org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;\nimport org.apache.maven.artifact.versioning.VersionRange;\nimport org.apache.maven.execution.MavenSession;\nimport org.apache.maven.plugin.logging.Log;\nimport org.apache.maven.repository.RepositorySystem;\nimport org.codehaus.plexus.util.FileUtils;\nimport org.codehaus.plexus.util.Os;\n\nimport java.io.File;\nimport java.io.FileWriter;\nimport java.io.IOException;\nimport java.io.PrintWriter;\nimport java.net.URL;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Set;\n\nimport static java.util.Collections.emptyMap;\n\n/**\n * Creates an executable {@code protoc} plugin (written in Java) from a {@link ProtocPlugin} specification.\n *\n * @since 0.3.0\n */\npublic class ProtocPluginAssembler {\n\n    private final ProtocPlugin pluginDefinition;\n\n    private final MavenSession session;\n\n    private final Artifact rootResolutionArtifact;\n\n    private final ArtifactFactory artifactFactory;\n\n    private final RepositorySystem repositorySystem;\n\n    private final ResolutionErrorHandler resolutionErrorHandler;\n\n    private final ArtifactRepository localRepository;\n\n    private final List<ArtifactRepository> remoteRepositories;\n\n    private final File pluginDirectory;\n\n    private final List<File> resolvedJars = new ArrayList<>();\n\n    private final File pluginExecutableFile;\n\n    private final Log log;\n\n    public ProtocPluginAssembler(\n            final ProtocPlugin pluginDefinition,\n            final MavenSession session,\n            final Artifact rootResolutionArtifact,\n            final ArtifactFactory artifactFactory,\n            final RepositorySystem repositorySystem,\n            final ResolutionErrorHandler resolutionErrorHandler,\n            final ArtifactRepository localRepository,\n            final List<ArtifactRepository> remoteRepositories,\n            final File pluginDirectory,\n            final Log log) {\n        this.pluginDefinition = pluginDefinition;\n        this.session = session;\n        this.rootResolutionArtifact = rootResolutionArtifact;\n        this.artifactFactory = artifactFactory;\n        this.repositorySystem = repositorySystem;\n        this.resolutionErrorHandler = resolutionErrorHandler;\n        this.localRepository = localRepository;\n        this.remoteRepositories = remoteRepositories;\n        this.pluginDirectory = pluginDirectory;\n        this.pluginExecutableFile = pluginDefinition.getPluginExecutableFile(pluginDirectory);\n        this.log = log;\n    }\n\n    /**\n     * Resolves the plugin's dependencies to the local Maven repository and builds the plugin executable.\n     */\n    public void execute() {\n        pluginDefinition.validate(log);\n\n        if (log.isDebugEnabled()) {\n            log.debug(\"plugin definition: \" + pluginDefinition);\n        }\n\n        resolvePluginDependencies();\n\n        if (Os.isFamily(Os.FAMILY_WINDOWS)) {\n            buildWindowsPlugin();\n            copyWinRun4JExecutable();\n        } else {\n            buildUnixPlugin();\n            pluginExecutableFile.setExecutable(true);\n        }\n    }\n\n    private void buildWindowsPlugin() {\n        createPluginDirectory();\n\n        // Try to locate jvm.dll based on pluginDefinition's javaHome property\n        final File javaHome = new File(pluginDefinition.getJavaHome());\n        final File jvmLocation = findJvmLocation(javaHome,\n                \"jre/bin/server/jvm.dll\",\n                \"bin/server/jvm.dll\",\n                \"jre/bin/client/jvm.dll\",\n                \"bin/client/jvm.dll\");\n        final File winRun4JIniFile = new File(pluginDirectory, pluginDefinition.getPluginName() + \".ini\");\n\n        if (log.isDebugEnabled()) {\n            log.debug(\"javaHome=\" + javaHome.getAbsolutePath());\n            log.debug(\"jvmLocation=\" + (jvmLocation != null ? jvmLocation.getAbsolutePath() : \"(none)\"));\n            log.debug(\"winRun4JIniFile=\" + winRun4JIniFile.getAbsolutePath());\n            log.debug(\"winJvmDataModel=\" + pluginDefinition.getWinJvmDataModel());\n        }\n\n        try (final PrintWriter out = new PrintWriter(new FileWriter(winRun4JIniFile))) {\n            if (jvmLocation != null) {\n                out.println(\"vm.location=\" + jvmLocation.getAbsolutePath());\n            }\n            int index = 1;\n            for (final File resolvedJar : resolvedJars) {\n                out.println(\"classpath.\" + index + \"=\" + resolvedJar.getAbsolutePath());\n                index++;\n            }\n            out.println(\"main.class=\" + pluginDefinition.getMainClass());\n\n            index = 1;\n            for (final String arg : pluginDefinition.getArgs()) {\n                out.println(\"arg.\" + index + \"=\" + arg);\n                index++;\n            }\n\n            index = 1;\n            for (final String jvmArg : pluginDefinition.getJvmArgs()) {\n                out.println(\"vmarg.\" + index + \"=\" + jvmArg);\n                index++;\n            }\n\n            out.println(\"vm.version.min=1.8\");\n\n            // keep from logging to stdout (the default)\n            out.println(\"log.level=none\");\n            out.println(\"[ErrorMessages]\");\n            out.println(\"show.popup=false\");\n        } catch (IOException e) {\n            throw new MojoInitializationException(\n                    \"Could not write WinRun4J ini file: \" + winRun4JIniFile.getAbsolutePath(), e);\n        }\n    }\n\n    private static File findJvmLocation(final File javaHome, final String... paths) {\n        for (final String path : paths) {\n            final File jvmLocation = new File(javaHome, path);\n            if (jvmLocation.isFile()) {\n                return jvmLocation;\n            }\n        }\n        return null;\n    }\n\n    private void copyWinRun4JExecutable() {\n        final String executablePath = getWinrun4jExecutablePath();\n        final URL url = Thread.currentThread().getContextClassLoader().getResource(executablePath);\n        if (url == null) {\n            throw new MojoInitializationException(\n                    \"Could not locate WinRun4J executable at path: \" + executablePath);\n        }\n        try {\n            FileUtils.copyURLToFile(url, pluginExecutableFile);\n        } catch (IOException e) {\n            throw new MojoInitializationException(\n                    \"Could not copy WinRun4J executable to: \" + pluginExecutableFile.getAbsolutePath(), e);\n        }\n    }\n\n    private void buildUnixPlugin() {\n        createPluginDirectory();\n\n        final File javaLocation = new File(pluginDefinition.getJavaHome(), \"bin/java\");\n\n        if (log.isDebugEnabled()) {\n            log.debug(\"javaLocation=\" + javaLocation.getAbsolutePath());\n        }\n\n        try (final PrintWriter out = new PrintWriter(new FileWriter(pluginExecutableFile))) {\n            out.println(\"#!/bin/sh\");\n            out.println();\n            out.print(\"CP=\");\n            for (int i = 0; i < resolvedJars.size(); i++) {\n                if (i > 0) {\n                    out.print(\":\");\n                }\n                out.print(\"\\\"\" + resolvedJars.get(i).getAbsolutePath() + \"\\\"\");\n            }\n            out.println();\n            out.print(\"ARGS=\\\"\");\n            for (final String arg : pluginDefinition.getArgs()) {\n                out.print(arg + \" \");\n            }\n            out.println(\"\\\"\");\n            out.print(\"JVMARGS=\\\"\");\n            for (final String jvmArg : pluginDefinition.getJvmArgs()) {\n                out.print(jvmArg + \" \");\n            }\n            out.println(\"\\\"\");\n            out.println();\n            out.println(\"\\\"\" + javaLocation.getAbsolutePath() + \"\\\" $JVMARGS -cp $CP \"\n                    + pluginDefinition.getMainClass() + \" $ARGS\");\n            out.println();\n        } catch (IOException e) {\n            throw new MojoInitializationException(\"Could not write plugin script file: \" + pluginExecutableFile, e);\n        }\n    }\n\n    private void createPluginDirectory() {\n        pluginDirectory.mkdirs();\n        if (!pluginDirectory.isDirectory()) {\n            throw new MojoInitializationException(\"Could not create protoc plugin directory: \"\n                    + pluginDirectory.getAbsolutePath());\n        }\n    }\n\n    private void resolvePluginDependencies() {\n\n        final VersionRange versionSpec;\n        try {\n            versionSpec = VersionRange.createFromVersionSpec(pluginDefinition.getVersion());\n        } catch (InvalidVersionSpecificationException e) {\n            throw new MojoConfigurationException(\"Invalid plugin version specification\", e);\n        }\n        final Artifact protocPluginArtifact =\n                artifactFactory.createDependencyArtifact(\n                        pluginDefinition.getGroupId(),\n                        pluginDefinition.getArtifactId(),\n                        versionSpec,\n                        \"jar\",\n                        pluginDefinition.getClassifier(),\n                        Artifact.SCOPE_RUNTIME);\n\n        final ArtifactResolutionRequest request = new ArtifactResolutionRequest()\n                .setArtifact(rootResolutionArtifact)\n                .setResolveRoot(false)\n                .setArtifactDependencies(Collections.singleton(protocPluginArtifact))\n                .setManagedVersionMap(emptyMap())\n                .setLocalRepository(localRepository)\n                .setRemoteRepositories(remoteRepositories)\n                .setOffline(session.isOffline())\n                .setForceUpdate(session.getRequest().isUpdateSnapshots())\n                .setServers(session.getRequest().getServers())\n                .setMirrors(session.getRequest().getMirrors())\n                .setProxies(session.getRequest().getProxies());\n\n        final ArtifactResolutionResult result = repositorySystem.resolve(request);\n\n        try {\n            resolutionErrorHandler.throwErrors(request, result);\n        } catch (ArtifactResolutionException e) {\n            throw new MojoInitializationException(\"Unable to resolve plugin artifact: \" + e.getMessage(), e);\n        }\n\n        final Set<Artifact> artifacts = result.getArtifacts();\n\n        if (artifacts == null || artifacts.isEmpty()) {\n            throw new MojoInitializationException(\"Unable to resolve plugin artifact\");\n        }\n\n        for (final Artifact artifact : artifacts) {\n            resolvedJars.add(artifact.getFile());\n        }\n\n        if (log.isDebugEnabled()) {\n            log.debug(\"Resolved jars: \" + resolvedJars);\n        }\n    }\n\n    private String getWinrun4jExecutablePath() {\n        return \"winrun4j/WinRun4J\" + pluginDefinition.getWinJvmDataModel() + \".exe\";\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocTestCompileCppMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport java.io.File;\n\n/**\n * This mojo executes the {@code protoc} compiler for generating test C++ sources\n * from protocol buffer definitions. It also searches dependency artifacts in the test scope for\n * {@code .proto} files and includes them in the {@code proto_path} so that they can be\n * referenced. Finally, it adds the {@code .proto} files to the project as test resources so\n * that they can be included in the test-jar artifact.\n *\n * @since 0.3.3\n */\n@Mojo(\n        name = \"test-compile-cpp\",\n        defaultPhase = LifecyclePhase.GENERATE_TEST_SOURCES,\n        requiresDependencyResolution = ResolutionScope.TEST,\n        threadSafe = true\n)\npublic final class ProtocTestCompileCppMojo extends AbstractProtocTestCompileMojo {\n\n    /**\n     * This is the directory into which the {@code .cpp} test sources will be created.\n     */\n    @Parameter(\n            required = true,\n            property = \"cppTestOutputDirectory\",\n            defaultValue = \"${project.build.directory}/generated-test-sources/protobuf/cpp\"\n    )\n    private File outputDirectory;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n        protocBuilder.setCppOutputDirectory(getOutputDirectory());\n        // We need to add project output directory to the protobuf import paths,\n        // in case test protobuf definitions extend or depend on production ones\n        final File buildOutputDirectory = new File(project.getBuild().getOutputDirectory());\n        if (buildOutputDirectory.exists()) {\n            protocBuilder.addProtoPathElement(buildOutputDirectory);\n        }\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        return outputDirectory;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocTestCompileCsharpMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport java.io.File;\n\n/**\n * This mojo executes the {@code protoc} compiler for generating test C# sources\n * from protocol buffer definitions. It also searches dependency artifacts in the test scope for\n * {@code .proto} files and includes them in the {@code proto_path} so that they can be\n * referenced. Finally, it adds the {@code .proto} files to the project as test resources so\n * that they can be included in the test-jar artifact.\n *\n * @since 0.6.0\n */\n@Mojo(\n        name = \"test-compile-csharp\",\n        defaultPhase = LifecyclePhase.GENERATE_TEST_SOURCES,\n        requiresDependencyResolution = ResolutionScope.TEST,\n        threadSafe = true\n)\npublic final class ProtocTestCompileCsharpMojo extends AbstractProtocTestCompileMojo {\n\n    /**\n     * This is the directory into which the {@code .cs} test sources will be created.\n     */\n    @Parameter(\n            required = true,\n            property = \"csharpTestOutputDirectory\",\n            defaultValue = \"${project.build.directory}/generated-test-sources/protobuf/csharp\"\n    )\n    private File outputDirectory;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n        protocBuilder.setCsharpOutputDirectory(getOutputDirectory());\n        // We need to add project output directory to the protobuf import paths,\n        // in case test protobuf definitions extend or depend on production ones\n        final File buildOutputDirectory = new File(project.getBuild().getOutputDirectory());\n        if (buildOutputDirectory.exists()) {\n            protocBuilder.addProtoPathElement(buildOutputDirectory);\n        }\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        return outputDirectory;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocTestCompileCustomMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.artifact.Artifact;\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\nimport org.apache.maven.toolchain.Toolchain;\n\nimport java.io.File;\n\n/**\n * This mojo executes the {@code protoc} compiler with the specified plugin\n * executable to generate test sources from protocol buffer definitions.\n * It also searches dependency artifacts for {@code .proto} files and\n * includes them in the {@code proto_path} so that they can be referenced.\n * Finally, it adds the {@code .proto} files to the project as resources so\n * that they can be included in the test-jar artifact.\n *\n * @since 0.4.1\n */\n@Mojo(\n        name = \"test-compile-custom\",\n        defaultPhase = LifecyclePhase.GENERATE_TEST_SOURCES,\n        requiresDependencyResolution = ResolutionScope.TEST,\n        threadSafe = true\n)\npublic final class ProtocTestCompileCustomMojo extends AbstractProtocTestCompileMojo {\n\n    /**\n     * A unique id that identifies the plugin to protoc.\n     * <strong>Cannot</strong> be one of the built-in protoc plugins:\n     * <ul>\n     *     <li>java</li>\n     *     <li>js</li>\n     *     <li>csharp</li>\n     *     <li>cpp</li>\n     *     <li>python</li>\n     *     <li>descriptor-set</li>\n     * </ul>\n     */\n    @Parameter(\n            required = true,\n            property = \"protocPluginId\"\n    )\n    private String pluginId;\n\n    /**\n     * This is the base directory for the generated code.\n     * If an explicit {@link #outputDirectory} parameter is not specified,\n     * an output directory named after {@link #pluginId} will be created\n     * inside this base directory.\n     */\n    @Parameter(\n            required = true,\n            readonly = true,\n            defaultValue = \"${project.build.directory}/generated-test-sources/protobuf\"\n    )\n    private File outputBaseDirectory;\n\n    /**\n     * This is the directory where the generated code will be placed.\n     * If this parameter is unspecified, then the default location is constructed as follows:<br>\n     * <code>${project.build.directory}/generated-test-sources/protobuf/&lt;pluginId&gt;</code>\n     */\n    @Parameter(\n            required = false,\n            property = \"protocPluginOutputDirectory\"\n    )\n    private File outputDirectory;\n\n    /**\n     * An optional path to plugin executable.\n     * If unspecified, alternative options must be used (e.g. toolchains).\n     */\n    @Parameter(\n            required = false,\n            property = \"protocPluginExecutable\"\n    )\n    private String pluginExecutable;\n\n    /**\n     * An optional parameter to be passed to the plugin.\n     * <b>Cannot</b> contain colon (<tt>:</tt>) symbols.\n     */\n    @Parameter(\n            required = false,\n            property = \"protocPluginParameter\"\n    )\n    private String pluginParameter;\n\n    /**\n     * A name of an optional custom toolchain that can be used to locate the plugin executable.\n     * The toolchain must be registered as a build extension and initialised properly.\n     */\n    @Parameter(\n            required = false,\n            property = \"protocPluginToolchain\"\n    )\n    private String pluginToolchain;\n\n    /**\n     * If {@link #pluginToolchain} is specified, this parameter specifies the tool in the toolchain,\n     * which is to be resolved as plugin executable.\n     */\n    @Parameter(\n            required = false,\n            property = \"protocPluginTool\"\n    )\n    private String pluginTool;\n\n    /**\n     * Plugin artifact specification, in {@code groupId:artifactId:version[:type[:classifier]]} format.\n     * When this parameter is set, the specified artifact will be resolved as a plugin executable.\n     *\n     * @since 0.4.1\n     */\n    @Parameter(\n            required = false,\n            property = \"protocPluginArtifact\"\n    )\n    private String pluginArtifact;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n\n        protocBuilder.setNativePluginId(pluginId);\n        if (pluginToolchain != null && pluginTool != null) {\n            //get toolchain from context\n            final Toolchain tc = toolchainManager.getToolchainFromBuildContext(pluginToolchain, session);\n            if (tc != null) {\n                getLog().info(\"Toolchain in protobuf-maven-plugin: \" + tc);\n                //when the executable to use is explicitly set by user in mojo's parameter, ignore toolchains.\n                if (pluginExecutable != null) {\n                    getLog().warn(\"Toolchains are ignored, 'pluginExecutable' parameter is set to \" + pluginExecutable);\n                } else {\n                    //assign the path to executable from toolchains\n                    pluginExecutable = tc.findTool(pluginTool);\n                }\n            }\n        }\n        if (pluginExecutable == null && pluginArtifact != null) {\n            final Artifact artifact = createDependencyArtifact(pluginArtifact);\n            final File file = resolveBinaryArtifact(artifact);\n            pluginExecutable = file.getAbsolutePath();\n        }\n        if (pluginExecutable != null) {\n            protocBuilder.setNativePluginExecutable(pluginExecutable);\n        }\n        if (pluginParameter != null) {\n            protocBuilder.setNativePluginParameter(pluginParameter);\n        }\n        protocBuilder.setCustomOutputDirectory(getOutputDirectory());\n\n        // We need to add project output directory to the protobuf import paths,\n        // in case test protobuf definitions extend or depend on production ones\n        final File buildOutputDirectory = new File(project.getBuild().getOutputDirectory());\n        if (buildOutputDirectory.exists()) {\n            protocBuilder.addProtoPathElement(buildOutputDirectory);\n        }\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        File outputDirectory = this.outputDirectory;\n        if (outputDirectory == null) {\n            outputDirectory = new File(outputBaseDirectory, pluginId);\n        }\n        return outputDirectory;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocTestCompileDescriptorSetMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport java.io.File;\n\n/**\n * This mojo executes {@code protoc} compiler for generating descriptor sets\n * from test protocol buffer definitions. It also searches dependency artifacts for\n * {@code .proto} files and includes them in the {@code proto_path} so that they can be\n * referenced. Finally, it adds the {@code .proto} files to the project as test resources so\n * that they can be included in the test-jar artifact. The generated descriptor set can be\n * optionally also attached to the project.\n *\n * @since 0.7.0\n */\n@Mojo(\n        name = \"test-compile-descriptor-set\",\n        defaultPhase = LifecyclePhase.GENERATE_TEST_RESOURCES,\n        requiresDependencyResolution = ResolutionScope.TEST,\n        threadSafe = true\n)\npublic final class ProtocTestCompileDescriptorSetMojo extends AbstractProtocTestCompileMojo {\n\n    /**\n     * This is the directory into which the descriptor set file will be created.\n     */\n    @Parameter(\n            required = true,\n            property = \"descriptorSetTestOutputDirectory\",\n            defaultValue = \"${project.build.directory}/generated-test-resources/protobuf/descriptor-sets\"\n    )\n    private File outputDirectory;\n\n    /**\n     * The descriptor set file name.\n     */\n    @Parameter(\n            required = true,\n            defaultValue = \"${project.build.finalName}.pb\"\n    )\n    protected String descriptorSetFileName;\n\n    /**\n     * If set to {@code true}, the generated descriptor set will be attached to the build.\n     */\n    @Parameter(\n            required = true,\n            defaultValue = \"false\"\n    )\n    protected boolean attach;\n\n    /**\n     * If generated descriptor set is to be attached to the build, specifies an optional classifier.\n     */\n    @Parameter(\n            required = false,\n            defaultValue = \"test\"\n    )\n    protected String classifier;\n\n    /**\n     * If {@code true}, the compiler will include all dependencies in the descriptor set, making it self-contained.\n     */\n    @Parameter(\n            required = false,\n            defaultValue = \"false\"\n    )\n    protected boolean includeImports;\n\n    /**\n     * If {@code true}, do not strip {@code SourceCodeInfo} from the {@code FileDescriptorProto}.\n     * This results in significantly larger descriptors that include information about the original location\n     * of each declaration in the source file, as well as surrounding comments.\n     */\n    @Parameter(\n            required = false,\n            defaultValue = \"false\"\n    )\n    protected boolean includeSourceInfo;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n        final File descriptorSetFile = new File(getOutputDirectory(), descriptorSetFileName);\n        getLog().info(\"Will generate descriptor set:\");\n        getLog().info(\" \" + descriptorSetFile.getAbsolutePath());\n        protocBuilder.withDescriptorSetFile(descriptorSetFile, includeImports, includeSourceInfo);\n        // We need to add project output directory to the protobuf import paths,\n        // in case test protobuf definitions extend or depend on production ones\n        final File buildOutputDirectory = new File(project.getBuild().getOutputDirectory());\n        if (buildOutputDirectory.exists()) {\n            protocBuilder.addProtoPathElement(buildOutputDirectory);\n        }\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        return outputDirectory;\n    }\n\n    @SuppressWarnings(\"MethodDoesntCallSuperMethod\")\n    @Override\n    protected void doAttachGeneratedFiles() {\n        final File outputDirectory = getOutputDirectory();\n        if (attach) {\n            final File descriptorSetFile = new File(getOutputDirectory(), descriptorSetFileName);\n            projectHelper.attachArtifact(project, \"test-pb\", classifier, descriptorSetFile);\n        }\n        buildContext.refresh(outputDirectory);\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocTestCompileJavaScriptMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport java.io.File;\n\n/**\n * This mojo executes the {@code protoc} compiler for generating test JavaScript sources\n * from protocol buffer definitions. It also searches dependency artifacts in the test scope for\n * {@code .proto} files and includes them in the {@code proto_path} so that they can be\n * referenced. Finally, it adds the {@code .proto} files to the project as test resources so\n * that they can be included in the test-jar artifact.\n *\n * @since 0.6.0\n */\n@Mojo(\n        name = \"test-compile-js\",\n        defaultPhase = LifecyclePhase.GENERATE_TEST_SOURCES,\n        requiresDependencyResolution = ResolutionScope.TEST,\n        threadSafe = true\n)\npublic final class ProtocTestCompileJavaScriptMojo extends AbstractProtocTestCompileMojo {\n\n    /**\n     * This is the directory into which the {@code .js} test sources will be created.\n     */\n    @Parameter(\n            required = true,\n            property = \"javaScriptTestOutputDirectory\",\n            defaultValue = \"${project.build.directory}/generated-test-sources/protobuf/js\"\n    )\n    private File outputDirectory;\n\n    /**\n     * Additional comma-separated options to be passed to the JavaScript generator.\n     * <b>Cannot</b> contain colon (<tt>:</tt>) symbols.\n     */\n    @Parameter(\n            required = false,\n            property = \"javaScriptOptions\"\n    )\n    private String javaScriptOptions;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n        if (javaScriptOptions != null) {\n            protocBuilder.setNativePluginParameter(javaScriptOptions);\n        }\n        protocBuilder.setJavaScriptOutputDirectory(getOutputDirectory());\n        // We need to add project output directory to the protobuf import paths,\n        // in case test protobuf definitions extend or depend on production ones\n        final File buildOutputDirectory = new File(project.getBuild().getOutputDirectory());\n        if (buildOutputDirectory.exists()) {\n            protocBuilder.addProtoPathElement(buildOutputDirectory);\n        }\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        return outputDirectory;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocTestCompileMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport java.io.File;\n\n/**\n * This mojo executes the {@code protoc} compiler for generating test Java sources\n * from protocol buffer definitions. It also searches dependency artifacts in the test scope for\n * {@code .proto} files and includes them in the {@code proto_path} so that they can be\n * referenced. Finally, it adds the {@code .proto} files to the project as test resources so\n * that they can be included in the test-jar artifact.\n *\n * @since 0.3.3\n */\n@Mojo(\n        name = \"test-compile\",\n        defaultPhase = LifecyclePhase.GENERATE_TEST_SOURCES,\n        requiresDependencyResolution = ResolutionScope.TEST,\n        threadSafe = true\n)\npublic final class ProtocTestCompileMojo extends AbstractProtocTestCompileMojo {\n\n    /**\n     * This is the directory into which the {@code .java} test sources will be created.\n     */\n    @Parameter(\n            required = true,\n            property = \"javaTestOutputDirectory\",\n            defaultValue = \"${project.build.directory}/generated-test-sources/protobuf/java\"\n    )\n    private File outputDirectory;\n\n    /**\n     * Additional comma-separated options to be passed to the Java generator.\n     * <b>Cannot</b> contain colon (<tt>:</tt>) symbols.\n     *\n     * @since 0.7.0\n     */\n    @Parameter(\n            required = false,\n            property = \"javaOptions\"\n    )\n    private String javaOptions;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n        if (javaOptions != null) {\n            protocBuilder.setNativePluginParameter(javaOptions);\n        }\n        protocBuilder.setJavaOutputDirectory(getOutputDirectory());\n        // We need to add project output directory to the protobuf import paths,\n        // in case test protobuf definitions extend or depend on production ones\n        final File buildOutputDirectory = new File(project.getBuild().getOutputDirectory());\n        if (buildOutputDirectory.exists()) {\n            protocBuilder.addProtoPathElement(buildOutputDirectory);\n        }\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        return outputDirectory;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/plugin/protobuf/ProtocTestCompilePythonMojo.java",
    "content": "package org.xolstice.maven.plugin.protobuf;\n\n/*\n * Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.plugins.annotations.LifecyclePhase;\nimport org.apache.maven.plugins.annotations.Mojo;\nimport org.apache.maven.plugins.annotations.Parameter;\nimport org.apache.maven.plugins.annotations.ResolutionScope;\n\nimport java.io.File;\n\n/**\n * This mojo executes the {@code protoc} compiler for generating test python sources\n * from protocol buffer definitions. It also searches dependency artifacts in the test scope for\n * {@code .proto} files and includes them in the {@code proto_path} so that they can be\n * referenced. Finally, it adds the {@code .proto} files to the project as test resources so\n * that they can be included in the test-jar artifact.\n *\n * @since 0.3.3\n */\n@Mojo(\n        name = \"test-compile-python\",\n        defaultPhase = LifecyclePhase.GENERATE_TEST_SOURCES,\n        requiresDependencyResolution = ResolutionScope.TEST,\n        threadSafe = true\n)\npublic final class ProtocTestCompilePythonMojo extends AbstractProtocTestCompileMojo {\n\n    /**\n     * This is the directory into which the {@code .py} test sources will be created.\n     */\n    @Parameter(\n            required = true,\n            property = \"pythonTestOutputDirectory\",\n            defaultValue = \"${project.build.directory}/generated-test-sources/protobuf/python\"\n    )\n    private File outputDirectory;\n\n    @Override\n    protected void addProtocBuilderParameters(final Protoc.Builder protocBuilder) {\n        super.addProtocBuilderParameters(protocBuilder);\n        protocBuilder.setPythonOutputDirectory(getOutputDirectory());\n        // We need to add project output directory to the protobuf import paths,\n        // in case test protobuf definitions extend or depend on production ones\n        final File buildOutputDirectory = new File(project.getBuild().getOutputDirectory());\n        if (buildOutputDirectory.exists()) {\n            protocBuilder.addProtoPathElement(buildOutputDirectory);\n        }\n    }\n\n    @Override\n    protected File getOutputDirectory() {\n        return outputDirectory;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/toolchain/protobuf/DefaultProtobufToolchain.java",
    "content": "package org.xolstice.maven.toolchain.protobuf;\n\n/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.toolchain.DefaultToolchain;\nimport org.apache.maven.toolchain.model.ToolchainModel;\nimport org.codehaus.plexus.logging.Logger;\nimport org.codehaus.plexus.util.FileUtils;\n\nimport java.io.File;\n\n/**\n * Based on {@code org.apache.maven.toolchain.java.DefaultJavaToolChain}.\n *\n * @since 0.2.0\n */\npublic class DefaultProtobufToolchain extends DefaultToolchain implements ProtobufToolchain {\n\n    public static final String KEY_PROTOC_EXECUTABLE = \"protocExecutable\";\n\n    protected DefaultProtobufToolchain(ToolchainModel model, Logger logger) {\n        super(model, \"protobuf\", logger);\n    }\n\n    private String protocExecutable;\n\n    @Override\n    public String findTool(String toolName) {\n        if (\"protoc\".equals(toolName)) {\n            File protoc = new File(FileUtils.normalize(getProtocExecutable()));\n            if (protoc.exists()) {\n                return protoc.getAbsolutePath();\n            }\n        }\n        return null;\n    }\n\n    @Override\n    public String getProtocExecutable() {\n        return this.protocExecutable;\n    }\n\n    @Override\n    public void setProtocExecutable(String protocExecutable) {\n        this.protocExecutable = protocExecutable;\n    }\n\n    @Override\n    public String toString() {\n        return \"PROTOC[\" + getProtocExecutable() + \"]\";\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/toolchain/protobuf/DefaultProtobufToolchainFactory.java",
    "content": "package org.xolstice.maven.toolchain.protobuf;\n\n/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.toolchain.MisconfiguredToolchainException;\nimport org.apache.maven.toolchain.RequirementMatcher;\nimport org.apache.maven.toolchain.RequirementMatcherFactory;\nimport org.apache.maven.toolchain.ToolchainFactory;\nimport org.apache.maven.toolchain.ToolchainPrivate;\nimport org.apache.maven.toolchain.model.ToolchainModel;\nimport org.codehaus.plexus.component.annotations.Component;\nimport org.codehaus.plexus.component.annotations.Requirement;\nimport org.codehaus.plexus.logging.Logger;\nimport org.codehaus.plexus.util.FileUtils;\nimport org.codehaus.plexus.util.xml.Xpp3Dom;\n\nimport java.io.File;\nimport java.util.Map;\nimport java.util.Properties;\n\n/**\n * Based on {@code org.apache.maven.toolchain.java.DefaultJavaToolchainFactory}.\n *\n * @since 0.2.0\n */\n@Component(\n        role = ToolchainFactory.class,\n        hint = \"protobuf\",\n        description = \"A default factory for 'protobuf' toolchains\")\npublic class DefaultProtobufToolchainFactory implements ToolchainFactory {\n\n    @Requirement\n    private Logger logger;\n\n    @Override\n    public ToolchainPrivate createToolchain(final ToolchainModel model) throws MisconfiguredToolchainException {\n        if (model == null) {\n            return null;\n        }\n        final DefaultProtobufToolchain toolchain = new DefaultProtobufToolchain(model, logger);\n\n        // populate the configuration section\n        final Properties configuration = toProperties((Xpp3Dom) model.getConfiguration());\n        final String protocExecutable = configuration.getProperty(DefaultProtobufToolchain.KEY_PROTOC_EXECUTABLE);\n        if (protocExecutable == null) {\n            throw new MisconfiguredToolchainException(\n                    \"Protobuf toolchain without the \"\n                            + DefaultProtobufToolchain.KEY_PROTOC_EXECUTABLE\n                            + \" configuration element.\");\n        }\n        final String normalizedProtocExecutablePath = FileUtils.normalize(protocExecutable);\n        final File protocExecutableFile = new File(normalizedProtocExecutablePath);\n        if (protocExecutableFile.exists()) {\n            toolchain.setProtocExecutable(normalizedProtocExecutablePath);\n        } else {\n            throw new MisconfiguredToolchainException(\n                    \"Non-existing protoc executable at \" + protocExecutableFile.getAbsolutePath());\n        }\n\n        // populate the provides section\n        final Properties provides = model.getProvides();\n        for (final Map.Entry<Object, Object> provide : provides.entrySet()) {\n            final String key = (String) provide.getKey();\n            final String value = (String) provide.getValue();\n\n            if (value == null) {\n                throw new MisconfiguredToolchainException(\n                        \"Provides token '\" + key + \"' doesn't have any value configured.\");\n            }\n\n            final RequirementMatcher matcher;\n            if (\"version\".equals(key)) {\n                matcher = RequirementMatcherFactory.createVersionMatcher(value);\n            } else {\n                matcher = RequirementMatcherFactory.createExactMatcher(value);\n            }\n            toolchain.addProvideToken(key, matcher);\n        }\n\n        return toolchain;\n    }\n\n    @Override\n    public ToolchainPrivate createDefaultToolchain() {\n        return null;\n    }\n\n    protected static Properties toProperties(final Xpp3Dom dom) {\n        final Properties props = new Properties();\n        final Xpp3Dom[] children = dom.getChildren();\n        for (final Xpp3Dom child : children) {\n            props.setProperty(child.getName(), child.getValue());\n        }\n        return props;\n    }\n}\n"
  },
  {
    "path": "src/main/java/org/xolstice/maven/toolchain/protobuf/ProtobufToolchain.java",
    "content": "package org.xolstice.maven.toolchain.protobuf;\n\n/*\n * Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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 */\n\nimport org.apache.maven.toolchain.Toolchain;\n\n/**\n * A tool chain for protobuf compiler (protoc).\n *\n * @since 0.2.0\n */\npublic interface ProtobufToolchain extends Toolchain {\n\n    String getProtocExecutable();\n\n    void setProtocExecutable(String protocExecutable);\n}\n"
  },
  {
    "path": "src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<lifecycleMappingMetadata>\n    <pluginExecutions>\n        <pluginExecution>\n            <pluginExecutionFilter>\n                <goals>\n                    <goal>compile</goal>\n                    <goal>test-compile</goal>\n                    <goal>compile-cpp</goal>\n                    <goal>test-compile-cpp</goal>\n                    <goal>compile-python</goal>\n                    <goal>test-compile-python</goal>\n                    <goal>compile-csharp</goal>\n                    <goal>test-compile-csharp</goal>\n                    <goal>compile-js</goal>\n                    <goal>test-compile-js</goal>\n                    <goal>compile-custom</goal>\n                    <goal>test-compile-custom</goal>\n                </goals>\n            </pluginExecutionFilter>\n            <action>\n                <execute>\n                    <runOnIncremental>true</runOnIncremental>\n                    <runOnConfiguration>true</runOnConfiguration>\n                </execute>\n            </action>\n        </pluginExecution>\n    </pluginExecutions>\n</lifecycleMappingMetadata>\n"
  },
  {
    "path": "src/main/resources/META-INF/plexus/components.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<component-set>\n    <components>\n        <component>\n            <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n            <role-hint>pb</role-hint>\n            <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n            <configuration>\n                <extension>pb</extension>\n                <type>pb</type>\n                <packaging>pb</packaging>\n                <language>protobuf</language>\n                <addedToClasspath>false</addedToClasspath>\n            </configuration>\n        </component>\n        <component>\n            <role>org.apache.maven.artifact.handler.ArtifactHandler</role>\n            <role-hint>test-pb</role-hint>\n            <implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>\n            <configuration>\n                <classifier>test</classifier>\n                <extension>pb</extension>\n                <type>test-pb</type>\n                <packaging>pb</packaging>\n                <language>protobuf</language>\n                <addedToClasspath>false</addedToClasspath>\n            </configuration>\n        </component>\n    </components>\n</component-set>\n"
  },
  {
    "path": "src/main/resources/winrun4j/README.txt",
    "content": "This directory includes a binary distribution of WinRun4J,\nwhich is used to execute protoc plugins written in Java\nunder 32-bit and 64-bit Windows operating systems.\n\nThe version of the binaries is 0.4.4, and the original download link is:\nhttps://sourceforge.net/projects/winrun4j/files/winrun4j/0.4.4/\n\nThe files from the original distribution archive were renamed as follows:\n\nInside winrun4J-0.4.4.zip   | In this directory | File size\n----------------------------+-------------------+----------\nwinrun4j\\bin\\WinRun4J.exe   | WinRun4J32.exe    |    46,592\nwinrun4j\\bin\\WinRun4J64.exe | WinRun4J64.exe    |   162,816\n\nMD5 and SHA256 hashes can be verified as follows:\n\n$ md5sum    -c WinRun4J.md5\n$ sha256sum -c WinRun4J.sha\n\nSignature can be verified with GPG:\n\n$ gpg --receive-keys 57F0A563FBCA5E5C59E6CA83063F2A19A91D9031\n$ gpg --verify WinRun4J.sha.asc WinRun4J.sha\n\n...or with Keybase:\n\n$ keybase id sergei_ivanov\n$ keybase pgp verify -i WinRun4J.sha -d WinRun4J.sha.asc\n\nAdditional information about WinRun4J is available on\nthe project's home page:\nhttp://winrun4j.sourceforge.net/\n"
  },
  {
    "path": "src/main/resources/winrun4j/WinRun4J.md5",
    "content": "98f00255f9a9b0dc4158062630032522 *WinRun4J32.exe\n83651a27d5b8533b0f029e2c9baf52c7 *WinRun4J64.exe\n"
  },
  {
    "path": "src/main/resources/winrun4j/WinRun4J.sha",
    "content": "c6b0cb2d04b721726d5a975b2e190977556f398f53ef05c0d347727a9bc76229 *WinRun4J32.exe\n89fe91aeec0b4d6c30d52a07c2b4decf9bbec6b6e24c1b3d96d012217cd7cb30 *WinRun4J64.exe\n"
  },
  {
    "path": "src/main/resources/winrun4j/WinRun4J.sha.asc",
    "content": "-----BEGIN PGP SIGNATURE-----\n\nwsFcBAABCAAQBQJcMQ/6CRAGPyoZqR2QMQAA+NAQAKBz3cfEYtitcsLZbG1Y/wqf\nNMAJdETPz+3hx/b6AFqHYZkQnlnNP/ILAJfTuIiBYmx7HyRhD8glgV0s/bbhpxF2\nX9F+TrVtxOu5zjpbQApNNYxQpIfnNb1RaVzgPS7oO8POz5qeYg2iIEvEtocIB7Xy\n9t6ADLQSvkHRCV/PzP9mT7drBqh6cQzzN0wwDfG2uRcybXXoguaa6T6dSlKLJpM4\nEQsZMMe6J8wwDKfmST0mTnv4AJ2uiArC21nKwQwdAzqa6bk6/HWntxUbg8/4lZYz\nMRAbjXUTGkV0V+yBPBQGCpp6QcWKQT+sTLObmGH68PeY65Vxh4QqZzQuSB7uHbZx\np4VO3g/+93+b/AlsJLY9xVcq/TfObU7GmeQbPqbVKDGMaIweBql9NdaqD4bjZf8r\nBNqG1btzV1qoWrvHMt2G8kDKrkfHmCWxztOe8F7As0LsQvQBOF8noZCQuNYFF4AF\nckKnpSFmHK+QZGaUASPbE/+XeVLiofpKJjkGYn0s1X75pmTgqIDaCGB4nK6bxZ12\niInC6kSr8BUO1Jm9yAPnOXxVSOfdYgXqOSKwwbc8Wm6IIXSL1W/WRvcn/wa9bkIJ\nc+tW6Id2xId9veZjLiGbOiwgHY44yED6qi3iL3NYBo4YdSBjdMU6W7LbDex5Fd2D\nGgdCK8tlziuPXdCRsW0x\n=DBuB\n-----END PGP SIGNATURE-----\n"
  },
  {
    "path": "src/site/apt/examples/protobuf-dependencies.apt.vm",
    "content": "~~\n~~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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~~\n\n            -------------------------------\n            Resolving Protobuf Dependencies\n            -------------------------------\n\n~~ APT Format: http://maven.apache.org/doxia/references/apt-format.html\n\nResolving Protobuf Dependencies\n\n* Overview\n\n  The source <<<*.proto>>> files are automatically added to the list of project resources,\n  so when the project is built, they included in the resulting jar artifact.\n\n  When building a dependent project, every dependency in the <<<compile>>> (or <<<test>>>) scope\n  is also automatically scanned for <<<*.proto>>> resources, and they are included on the include\n  path for protobuf compiler. This also works for multi-module Maven reactor projects.\n\n* Project layout\n\n  By convention, protobuf sources are expected to be inside <<<src/main/proto>>> directory\n  (although this is configurable).\n\n  The main requirement is that if a protobuf package is declared in the proto file,\n  it must match its subdirectory under <<<src/main/proto>>>. If there is no package declaration,\n  the file must reside directly inside <<<src/main/proto>>> and not in any subdirectory thereof.\n  Otherwise protobuf compiler will have major problems resolving imports.\n\n  So if a <<<test1.proto>>> file contains:\n\n+-----+\npackage it.project1;\n+-----+\n\n  ...then the proto file should reside in <<<src/main/proto/it/project1>>>.\n   And another proto file (possibly in another Maven module or project) will then be able to import it:\n\n+-----+\nimport \"it/project1/test1.proto\";\n+-----+\n\n* Including dependencies\n\n  When building a dependent project, where protobuf definitions import other definitions that\n  are packaged into dependencies, it is important to make sure that the compiled classes are\n  also available on the classpath (for example, imported through the same jar dependency).\n\n  In a typical scenario, simply declaring a Maven dependency is enough, as long as it's\n  been generated by <<<${project.artifactId}>>> or follows the same packaging structure.\n\n  When generating Java code <<<com.google.protobuf:protobuf-java>>> dependency\n  must always be included and must be of the same version as protobuf compiler.\n  That dependency has some core protobuf definitions bundled too.\n\n  Sample configuration that demonstrates both the usage of dependencies and\n  the usage of additional protobuf compiler plugins:\n\n+-----+\n\n<project>\n  ...\n  <properties>\n    <protobufVersion>3.11.1</protobufVersion>\n    <grpcVersion>1.7.0</grpcVersion>\n  </properties>\n  ...\n  <build>\n    <extensions>\n      <extension>\n        <groupId>kr.motd.maven</groupId>\n        <artifactId>os-maven-plugin</artifactId>\n        <version>1.6.1</version>\n      </extension>\n    </extensions>\n    <plugins>\n      <plugin>\n        <groupId>${project.groupId}</groupId>\n        <artifactId>${project.artifactId}</artifactId>\n        <version>${project.version}</version>\n        <configuration>\n          <!-- Common configuration, used by all goals -->\n          <protocArtifact>\n            com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}\n          </protocArtifact>\n        </configuration>\n        <executions>\n          <execution>\n            <id>protoc-java</id>\n            <goals>\n              <goal>compile</goal>\n            </goals>\n          </execution>\n          <execution>\n            <id>protoc-grpc</id>\n            <goals>\n              <goal>compile-custom</goal>\n            </goals>\n            <configuration>\n              <!-- Configuration for a specific goal -->\n              <pluginId>grpc</pluginId>\n              <pluginArtifact>\n                io.grpc:protoc-gen-grpc-java:${grpcVersion}:exe:${os.detected.classifier}\n              </pluginArtifact>\n            </configuration>\n          </execution>\n        </executions>\n      </plugin>\n      ...\n    </plugins>\n    ...\n  </build>\n  ...\n  <!-- Core protobuf dependency -->\n  <dependencies>\n    <dependency>\n      <groupId>com.google.protobuf</groupId>\n      <artifactId>protobuf-java</artifactId>\n      <version>${protobufVersion}</version>\n    </dependency>\n    <!-- Another dependency that contains both protobuf definitions and compiled java sources -->\n    <dependency>\n      <groupId>com.google.api.grpc</groupId>\n      <artifactId>proto-google-common-protos</artifactId>\n      <version>1.12.0</version>\n    </dependency>\n    <!-- gRPC dependencies -->\n    <dependency>\n      <groupId>io.grpc</groupId>\n      <artifactId>grpc-netty</artifactId>\n      <version>${grpcVersion}</version>\n    </dependency>\n    <dependency>\n      <groupId>io.grpc</groupId>\n      <artifactId>grpc-protobuf</artifactId>\n      <version>${grpcVersion}</version>\n    </dependency>\n    <dependency>\n      <groupId>io.grpc</groupId>\n      <artifactId>grpc-stub</artifactId>\n      <version>${grpcVersion}</version>\n    </dependency>\n  </dependencies>\n  ...\n</project>\n\n+-----+\n"
  },
  {
    "path": "src/site/apt/examples/protobuf-toolchain.apt.vm",
    "content": "~~\n~~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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~~\n\n            ------------------------\n            Using Protobuf Toolchain\n            ------------------------\n\n~~ APT Format: http://maven.apache.org/doxia/references/apt-format.html\n\nUsing Protobuf Toolchain\n\n* Defining Toolchains\n\n  Toolchains are declared in a <<<toolchains.xml>>> file, which is by default expected to reside in\n  <<<~/.m2>>> directory (however, in Maven3 it is possible to override the default location\n  with <<<-t>>> or <<<--toolchains>>> command line parameter).\n\n  A sample <<<toolchains.xml>>> file with a protobuf toolchain definition:\n\n+-----+\n\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<toolchains>\n  <toolchain>\n    <type>protobuf</type>\n    <provides>\n      <version>2.4.1</version>\n    </provides>\n    <configuration>\n      <protocExecutable>C:/Java/protobuf-2.4.1/bin/protoc.exe</protocExecutable>\n    </configuration>\n  </toolchain>\n  ...\n</toolchains>\n\n+-----+\n\n  ~~ TODO explain the above\n\n* Using Protobuf Toolchain In Standalone Project\n\n  ~~ TODO detailed explanation\n  ~~ TODO mention that protobuf-maven-plugin extensions are required for the operation of maven-toolchains-plugin\n\n  A sample configuration is provided below:\n\n+-----+\n\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-toolchains-plugin</artifactId>\n          <version>3.0.0</version>\n        <executions>\n          <execution>\n            <phase>validate</phase>\n            <goals>\n              <goal>toolchain</goal>\n            </goals>\n          </execution>\n        </executions>\n        <configuration>\n          <toolchains>\n            <protobuf>\n              <version>[2.4,2.5)</version>\n            </protobuf>\n          </toolchains>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>${project.groupId}</groupId>\n        <artifactId>${project.artifactId}</artifactId>\n        <version>${project.version}</version>\n        <extensions>true</extensions>\n        <executions>\n          <execution>\n            <goals>\n              <goal>compile</goal>\n              <goal>test-compile</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n      ...\n    </plugins>\n    ...\n  </build>\n  ...\n</project>\n\n+-----+\n\n* Reusing Protobuf Toolchain From Parent Project\n\n  Suppose that there is a common parent for a number of child projects,\n  which may also be contained as modules in the parent project.\n  In that case it makes sense to enforce the toolchain once\n  in the parent project and let the children inherit it.\n\n  Parent project is configured as in the example below.\n  Note that only extensions are required from ${project.artifactId};\n  all the executions will be declared in the child projects.\n\n+-----+\n\n<project>\n  ...\n  <packaging>pom</packaging>\n  <groupId>com.yourcompany</groupId>\n  <artifactId>parent</artifactId>\n  <version>1.0</version>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-toolchains-plugin</artifactId>\n          <version>3.0.0</version>\n        <executions>\n          <execution>\n            <phase>validate</phase>\n            <goals>\n              <goal>toolchain</goal>\n            </goals>\n          </execution>\n        </executions>\n        <configuration>\n          <toolchains>\n            <protobuf>\n              <version>[2.4,2.5)</version>\n            </protobuf>\n          </toolchains>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>${project.groupId}</groupId>\n        <artifactId>${project.artifactId}</artifactId>\n        <version>${project.version}</version>\n        <extensions>true</extensions>\n      </plugin>\n      ...\n    </plugins>\n    ...\n  </build>\n  ...\n</project>\n\n+-----+\n\n  Child project is configured as in the example below.\n  Note that there is no need to load ${project.artifactId} extensions in the child project,\n  and neither there is any need to load toolchains again: this is all handled by the parent project.\n\n+-----+\n\n<project>\n  ...\n  <parent>\n    <groupId>com.yourcompany</groupId>\n    <artifactId>parent</artifactId>\n    <version>1.0</version>\n  </parent>\n  <groupId>com.yourcompany</groupId>\n  <artifactId>child</artifactId>\n  <version>1.0</version>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>${project.groupId}</groupId>\n        <artifactId>${project.artifactId}</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>compile</goal>\n              <goal>test-compile</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n      ...\n    </plugins>\n    ...\n  </build>\n  ...\n</project>\n\n+-----+\n\n* References\n\n  * {{{http://maven.apache.org/plugins/maven-toolchains-plugin/} Maven Toolchains Plugin}}\n\n  * {{{http://maven.apache.org/ref/2.2.1/maven-toolchain/toolchains.html} Toolchain descriptor}}\n\n  []\n"
  },
  {
    "path": "src/site/apt/examples/protoc-artifact.apt.vm",
    "content": "~~\n~~ Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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~~\n\n            -------------------------------------------------\n            Resolving Protoc Artifact From Maven Central Repo\n            -------------------------------------------------\n\n~~ APT Format: http://maven.apache.org/doxia/references/apt-format.html\n\nResolving Protoc Artifact From Maven Central Repo\n\n* Overview\n\n  Starting with versions <<<2.6.1>>> and <<<3.0.0-alpha-2>>> of <<<protoc>>>, its binary executables\n  for all major operating systems are available as artifacts in Maven central.\n  These artifacts can be referenced in plugin configuration as described below.\n  The plugin automatically resolves and downloads the <<<protoc>>> executable,\n  and uses it for compiling protobuf definitions.\n\n* Usage\n\n  It is recommended to use {{{https://github.com/trustin/os-maven-plugin} os-maven-plugin}} to automatically\n  generate a classifier for the current OS and architecture. The same plugin is used by protobuf team at Google\n  to generate classifiers for <<<protoc>>> artifacts.\n\n  Plugin parameter <<<protocArtifact>>> can be used for specifying artifact coordinates in a\n  <<<groupId:artifactId:version\\[:type\\[:classifier\\]\\]>>> format.\n\n  A sample configuration is provided below:\n\n+-----+\n\n<project>\n  ...\n  <build>\n    <extensions>\n      <extension>\n        <groupId>kr.motd.maven</groupId>\n        <artifactId>os-maven-plugin</artifactId>\n        <version>1.6.1</version>\n      </extension>\n    </extensions>\n    <plugins>\n      <plugin>\n        <groupId>${project.groupId}</groupId>\n        <artifactId>${project.artifactId}</artifactId>\n        <version>${project.version}</version>\n        <executions>\n          <execution>\n            <goals>\n              <goal>compile</goal>\n              <goal>test-compile</goal>\n            </goals>\n          </execution>\n        </executions>\n        <configuration>\n          <protocArtifact>com.google.protobuf:protoc:3.4.0:exe:${os.detected.classifier}</protocArtifact>\n        </configuration>\n      </plugin>\n      ...\n    </plugins>\n    ...\n  </build>\n  ...\n</project>\n\n+-----+\n\n  Eclipse users, please also read\n  {{{https://github.com/trustin/os-maven-plugin/blob/master/README.md#issues-with-eclipse-m2e-or-other-ides}the following notes}}.\n"
  },
  {
    "path": "src/site/apt/examples/protoc-plugin.apt.vm",
    "content": "~~\n~~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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~~\n\n            ---------------------------\n            Using Custom Protoc Plugins\n            ---------------------------\n\n~~ APT Format: http://maven.apache.org/doxia/references/apt-format.html\n\nUsing Custom Protoc Plugins\n\n  It is possible to customize <<<protoc>>>'s output with plugins.\n  Protoc plugins are executables that are invoked by <<<protoc>>>.\n  They read code generator requests from <<<stdin>>> and output results to <<<stdout>>>.\n\n  Currently, both native and pure Java plugins are supported.\n\n  Plugins written in Java (or any other JVM language) have to be resolvable as Maven artifacts.\n  Also, the output directory for generated files is the same as the Java output directory.\n  They are configured by adding a <<<protocPlugins>>> element containing one of more <<<protocPlugin>>> elements\n  to the <<<configuration>>> section.\n\n  Native plugins are supported by two dedicated goals: {{{../compile-custom-mojo.html}${goalPrefix}:compile-custom}}\n  and {{{../test-compile-custom-mojo.html}${goalPrefix}:test-compile-custom}}.\n\n* Using a pure Java <<<protoc>>> plugin\n\n  The following example includes uses a single plugin to generate Java code in addition\n  to <<<protoc>>>'s regular output.\n\n+-----+\n\n<plugin>\n  <groupId>${project.groupId}</groupId>\n  <artifactId>${project.artifactId}</artifactId>\n  <version>${project.version}</version>\n  <extensions>true</extensions>\n  <executions>\n    <execution>\n      <goals>\n          <goal>compile</goal>\n      </goals>\n      <configuration>\n        <protocPlugins>\n          <protocPlugin>\n            <id>myproto</id>\n            <groupId>myproto</groupId>\n            <artifactId>myproto-protoc-plugin</artifactId>\n            <version>1.2</version>\n            <mainClass>myproto.MyProtocPlugin</mainClass>\n          </protocPlugin>\n        </protocPlugins>\n      </configuration>\n    </execution>\n  </executions>\n</plugin>\n\n+-----+\n\n  This will resolve the Maven artifact <<<myproto:myproto-protoc-plugin:1.2>>> and its dependencies, create\n  a plugin executable on the fly and then invoke <<<protoc>>> with the argument <<<--myproto_out=JAVAOUT>>>\n  where <<<JAVAOUT>>> is same directory used for the <<<--java_out>>> argument.\n\n* <<<protocPlugin>>> Options\n\n  The following options can be  included in the <<<protocPlugin>>> element:\n\n  * <<<id>>> - (required) unique id for this plugin\n\n  * <<<groupId>>> - (required) group id for dependency resolution\n\n  * <<<artifactId>>> - (required) artifact id for dependency resolution\n\n  * <<<version>>> - (required) version specification for dependency resolution,\n        can be either a single version (e.g. <<<1.2>>>) or a version range (e.g. <<<[1.2,1.3)>>>)\n\n  * <<<classifier>>> - (optional) artifact classifier for dependency resolution\n\n  * <<<mainClass>>> - (required) Java main class to execute\n\n  * <<<javaHome>>> - (optional) location of the JDK used for executing the plugin;\n    uses the JDK specified in <<<toolchains.xml>>> or the value of the <<<java.home>>> system property as default\n\n  * <<<winJvmDataModel>>> - (optional; Windows only) data model of the JVM under <<<javaHome>>>. Possible values\n    are '32' or '64'.\n\n  * <<<args>>> - (optional) argument to pass to the <<<main>>> method\n\n  * <<<jvmArgs>>> - (optional) JVM arguments\n\n  []\n\n  The location of the <<<java>>> command (on UNIX) or <<<jvm.dll>>> on Windows is determined as follows. First, the\n  <<<javaHome>>> option in <<<protocPlugin>>> is used, if present. Otherwise, the <<<jdkHome>>> location of the\n  <<<jdk>>> toolchain in <<<toolchains.xml>>> is used. If no toolchain has been set up, the JDK that's running\n  Maven is used (the value of the <<<java.home>>> system property).\n\n  When running on Windows the plugin will try to determine whether <<<javaHome>>> is pointing to a 32-bit or\n  64-bit JDK/JRE. If it cannot determine the data model from directories under <<<javaHome>>> it will use the\n  value of the <<<sun.arch.data.model>>> system property in the JVM that is running the plugin code. If that\n  system property does not exist it will default to 32-bit. The value can be overridden by setting the\n  <<<winJvmDataModel>>> option.\n\n\n* Java plugin generation\n\n  A Java-based executable is assembled on the fly from the specified artifact and its dependencies and executed by\n  <<<protoc>>>. The way this is done is platform-dependent.\n\n  On UNIX, a shell script is created in <<<target/protoc-plugins>>> that builds a classpath from local repository\n  paths of all resolved artifacts and then runs the configured <<<java>>> command.\n\n  On Windows, a WinRun4J executable (bundled inside the Maven plugin jar) is copied into <<<target/protoc-plugins>>>\n  and an <<<.ini>>> is generated with the required classpath, <<<jvm.dll>>> location, main class and arguments.\n\n  The <<<target/protoc-plugins>>> directory is prepended to the <<<PATH>>> in <<<protoc>>>'s runtime environment.\n\n\n* References\n\n  * {{{https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.compiler.plugin.pb} protoc plugin API}}\n\n  []\n"
  },
  {
    "path": "src/site/apt/index.apt.vm",
    "content": "~~\n~~ Copyright (c) 2020 Maven Protocol Buffers Plugin Authors. All rights reserved.\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~~\n\n            ------------\n            Introduction\n            ------------\n\n~~ APT Format: http://maven.apache.org/doxia/references/apt-format.html\n\n${project.name}\n\n  ${project.name} uses Protocol Buffer Compiler (<<<protoc>>>) tool to generate Java source files\n  from <<<.proto>>> (protocol buffer definition) files for the specified project.\n  For more information about the Protocol Buffer Compiler, please refer to\n  {{{https://developers.google.com/protocol-buffers/docs/reference/java-generated}Reference Guide}}.\n\n  The Plugin automatically scans all project dependencies for bundled <<<.proto>>> files,\n  and configures <<<proto_path>>> of the Protocol Buffer Compiler to use those files as imports.\n\n  The Plugin automatically attaches the source <<<.proto>>> files to the resources of the project,\n  so that they are later packaged into the final artifact and can be referenced as imports\n  from the dependent projects or modules.\n\n* Goals Overview\n\n  ${project.name} has the following goals:\n\n  * {{{./compile-mojo.html}${goalPrefix}:compile}}\n    compiles main <<<.proto>>> definitions into Java files and attaches the generated Java sources to the project.\n\n  * {{{./test-compile-mojo.html}${goalPrefix}:test-compile}}\n    compiles test <<<.proto>>> definitions into Java files and attaches the generated Java test sources to the project.\n\n  * {{{./compile-cpp-mojo.html}${goalPrefix}:compile-cpp}}\n    compiles main <<<.proto>>> definitions into C++ files and attaches the generated C++ sources to the project.\n\n  * {{{./test-compile-cpp-mojo.html}${goalPrefix}:test-compile-cpp}}\n    compiles test <<<.proto>>> definitions into C++ files and attaches the generated C++ test sources to the project.\n\n  * {{{./compile-python-mojo.html}${goalPrefix}:compile-python}}\n    compiles main <<<.proto>>> definitions into Python files and attaches the generated Python sources to the project.\n\n  * {{{./test-compile-python-mojo.html}${goalPrefix}:test-compile-python}}\n    compiles test <<<.proto>>> definitions into Python files and attaches the generated Python test sources to the project.\n\n  * {{{./compile-csharp-mojo.html}${goalPrefix}:compile-csharp}}\n    compiles main <<<.proto>>> definitions into C# files and attaches the generated C# sources to the project.\n\n  * {{{./test-compile-csharp-mojo.html}${goalPrefix}:test-compile-csharp}}\n    compiles test <<<.proto>>> definitions into C# files and attaches the generated C# test sources to the project.\n\n  * {{{./compile-js-mojo.html}${goalPrefix}:compile-js}}\n    compiles main <<<.proto>>> definitions into JavaScript files and attaches the generated JavaScript sources to the project.\n\n  * {{{./test-compile-js-mojo.html}${goalPrefix}:test-compile-js}}\n    compiles test <<<.proto>>> definitions into JavaScript files and attaches the generated JavaScript test sources to the project.\n\n  * {{{./compile-descriptor-set-mojo.html}${goalPrefix}:compile-descriptor-set}}\n    generates a descriptor set from main <<<.proto>>> definitions.\n\n  * {{{./test-compile-descriptor-set-mojo.html}${goalPrefix}:test-compile-descriptor-set}}\n    generates a descriptor set from test <<<.proto>>> definitions.\n\n  * {{{./compile-custom-mojo.html}${goalPrefix}:compile-custom}}\n    compiles main <<<.proto>>> definitions using a custom <<<protoc>>> plugin.\n\n  * {{{./test-compile-custom-mojo.html}${goalPrefix}:test-compile-custom}}\n    compiles test <<<.proto>>> definitions using a custom <<<protoc>>> plugin.\n\n  []\n\n* Usage\n\n  General instructions on how to use ${project.name} can be found on the {{{./usage.html}usage page}}.\n  Some more specific use cases are described in the examples given below.\n\n  In case you still have questions regarding the Plugin's usage, please have a look at the {{{./faq.html}FAQ}}.\n  ~~ TODO add mailing lists / newsgroups / wiki\n\n  If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our\n  {{{./issue-management.html}issue tracker}}. When creating a new issue, please provide a comprehensive description of your\n  concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason,\n  entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated.\n\n  Of course, patches and pull requests are welcome, too. Contributors can check out the project from the\n  {{{./scm.html}source repository}} and will find supplementary information in the\n  contributor's guide available there.\n\n* Examples\n\n  To provide you with better understanding of some usages of ${project.name},\n  you can take a look into the following examples:\n\n  * {{{./examples/protobuf-dependencies.html} Resolving Protobuf Dependencies}}\n\n  * {{{./examples/protobuf-toolchain.html} Using Protobuf Toolchain}}\n\n  * {{{./examples/protoc-artifact.html} Resolving Protoc Artifact From Maven Central Repo}}\n\n  * {{{./examples/protoc-plugin.html} Using Custom Protoc Plugins}}\n\n  []\n"
  },
  {
    "path": "src/site/apt/usage.apt.vm",
    "content": "~~\n~~ Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved.\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~~\n\n            -----\n            Usage\n            -----\n\n~~ APT Format: http://maven.apache.org/doxia/references/apt-format.html\n\nUsage\n\n  ${project.name} generates Java, C++ or Python sources from <<<.proto>>> files using the <<<protoc>>> tool.\n  The following examples describe the basic usage of the Plugin.\n\n* Compiling Protobuf Sources into Java\n\n  The following default directory structure of the project is assumed:\n\n+-----+\n\n./\n+- pom.xml\n+- src/\n   +- main/\n      +- proto/\n         +- message.proto\n   +- test/\n      +- proto/\n         +- test_message.proto\n\n+-----+\n\n  Protocol buffer definitions are looked up under <<<src/main/proto/>>> directory by default.\n  Any subdirectories under <<<src/main/proto/>>> are treated as package structure for protobuf definition imports.\n  Similarly, protobuf definitions for use in tests are looked up under <<<src/test/proto/>>> directory\n  by default.\n\n  A minimal configuration to invoke this plugin would look like:\n\n+-----+\n\n<project>\n  ...\n  <build>\n    <plugins>\n      <plugin>\n        <groupId>org.apache.maven.plugins</groupId>\n        <artifactId>maven-compiler-plugin</artifactId>\n          <version>3.8.1</version>\n        <configuration>\n          <source>1.8</source>\n          <target>1.8</target>\n        </configuration>\n      </plugin>\n      <plugin>\n        <groupId>${project.groupId}</groupId>\n        <artifactId>${project.artifactId}</artifactId>\n        <version>${project.version}</version>\n        <configuration>\n          <protocExecutable>/usr/local/bin/protoc</protocExecutable>\n        </configuration>\n        <executions>\n          <execution>\n            <goals>\n              <goal>compile</goal>\n              <goal>test-compile</goal>\n            </goals>\n          </execution>\n        </executions>\n      </plugin>\n      ...\n    </plugins>\n  </build>\n  <dependencies>\n    <dependency>\n      <groupId>com.google.protobuf</groupId>\n      <artifactId>protobuf-java</artifactId>\n      <version>3.4.0</version>\n    </dependency>\n    ...\n  </dependencies>\n  ...\n</project>\n\n+-----+\n\n  The following conditions need to be met:\n\n  * Java 1.8 or newer is required for running Maven\n\n  * Java 1.8 or newer is required for compiling the generated sources\n\n  * Either <<<protoc>>> executable has to be in the <<<PATH>>> or\n    the <<<protocExecutable>>> parameter has to be set to the correct location.\n    An alternative configuration involves toolchains (described in plugin examples).\n\n  * Plugin executions need to be defined, because the plugin is not part of the default lifecycle.\n    However, plugin goals have default bindings to appropriate phases, therefore there is typically\n    no need to specify phase bindings in plugin configuration.\\\n    Note: <<<{{{./test-compile-mojo.html}test-compile}}>>> goal will only be needed if there are custom protocol\n    buffer definitions being used in your tests.\n\n  * An appropriate version of <<<com.google.protobuf:protobuf-java>>> dependency has to be declared,\n    or made available through POM inheritance: this is needed for compiling the generated source code.\n    Note: it is important to make sure that the version of protobuf compiler is compatible\n    with the version of protobuf java library (ideally they should be of the same version),\n    otherwise the generated code will fail to compile.\n\n  []\n\n  As soon as everything is set up, execute the following goals to build the project:\n\n+-----+\n\nmvn clean install\n\n+-----+\n\n* Dealing with \"Command line is too long\" errors\n\n  This plugin simply invokes <<<protoc>>> binary, passing all necessary arguments on the command line.\n  In some configurations with a very large number of protobuf definitions this may be a problem,\n  due to the limits on command line length in the host operating system.\n  Starting with <<<protoc>>> version 3.5.0 this can be worked around by passing the following option:\n\n+-----+\n\n<plugin>\n  <groupId>${project.groupId}</groupId>\n  <artifactId>${project.artifactId}</artifactId>\n  <version>${project.version}</version>\n  <configuration>\n    ...\n    <useArgumentFile>true</useArgumentFile>\n  </configuration>\n  ...\n</plugin>\n\n+-----+\n\n  Unfortunately, for versions of <<<protoc>>> below 3.5.0, the only available option is to split\n  the compilation into smaller chunks by decomposing the project into modules.\n\n* Compiling Protobuf Sources into other programming languages\n\n  The plugin configuration is similar to compiling into Java, with the following alterations:\n\n  * A different set of goals will need to be used (e.g. {{{./compile-cpp-mojo.html}compile-cpp}});\n\n  * A dependency on <<<com.google.protobuf:protobuf-java>>> artifact may not be required.\n\n  []\n\n* Running Plugin Goals On Command Line\n\n  It is possible to run ${project.name} goals from the command line,\n  even if the plugin is not configured in the project:\n\n+-----+\n\nmvn ${goalPrefix}:compile      -DprotocExecutable=\"C:/Java/protobuf-2.4.1/bin/protoc.exe\"\nmvn ${goalPrefix}:test-compile -DprotocExecutable=\"C:/Java/protobuf-2.4.1/bin/protoc.exe\"\n\n+-----+\n\n  If a <<<protobuf>>> toolchain is configured in the project,\n  then the toolchains plugin needs to be executed first\n  and there is no need to specify the <<<protocExecutable>>> parameter.\n\n+-----+\n\nmvn toolchains:toolchain ${goalPrefix}:compile\nmvn toolchains:toolchain ${goalPrefix}:test-compile\n\n+-----+\n\n* Suppressing Compilation Of Unchanged Definitions\n\n  Normally this plugin invokes <<<protoc>>> compilation on every execution,\n  but this can be overridden by the following configuration option:\n\n+-----+\n\n<plugin>\n  <groupId>${project.groupId}</groupId>\n  <artifactId>${project.artifactId}</artifactId>\n  <version>${project.version}</version>\n  <configuration>\n    ...\n    <checkStaleness>true</checkStaleness>\n  </configuration>\n  ...\n</plugin>\n\n+-----+\n\n  If the project is built on NFS, the following setting may also be needed:\n\n+-----+\n\n<plugin>\n  <groupId>${project.groupId}</groupId>\n  <artifactId>${project.artifactId}</artifactId>\n  <version>${project.version}</version>\n  <configuration>\n    ...\n    <checkStaleness>true</checkStaleness>\n    <staleMillis>10000</staleMillis>\n  </configuration>\n  ...\n</plugin>\n\n+-----+\n\n* Output Of Binary File Descriptor Sets\n\n  It is possible to output binary <<<FileDescriptorSet>>> files containing all the descriptor\n  metadata for generated classes. Descriptor sets are written by passing the <<<--descriptor_set_out>>>\n  and <<<--include_imports>>> arguments to <<<protoc>>>.\n\n  Generated descriptor sets can optionally be attached to the build as artifacts.\n  The default type and extension for descriptor sets is <<<pb>>>, and the plugin extensions need\n  to be enabled in order to support the correct resolution of those dependencies in downstream projects.\n\n  Please see documentation for the following goals:\n  {{{./compile-descriptor-set-mojo.html}compile-descriptor-set}} and\n  {{{./test-compile-descriptor-set-mojo.html}test-compile-descriptor-set}}.\n"
  },
  {
    "path": "src/site/fml/faq.fml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2018 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<faqs xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n      xmlns=\"http://maven.apache.org/FML/1.0.1\"\n      xsi:schemaLocation=\"http://maven.apache.org/FML/1.0.1 http://maven.apache.org/xsd/fml-1.0.1.xsd\"\n      id=\"FAQ\" title=\"Frequently Asked Questions\">\n\n    <part id=\"General\">\n        <faq id=\"faq_1\">\n            <question>\n                Can the plugin automatically download and use the required version of <code>protoc</code>?\n            </question>\n            <answer>\n                It depends on the version of <code>protoc</code>.\n                Protocol Buffer Compiler is a native application and is distributed as a binary executable file.\n                Previously, it was not distributed via Maven repository, but that policy has recently changed.\n                Starting with versions <code>2.6.1</code> and <code>3.0.0-alpha-2</code>, binary executables\n                for all major operating systems are available as artifacts in Maven central, and these artifacts\n                can be referenced in plugin configuration.\n                For any prior versions the application developer will need to configure <code>protoc</code> executable location\n                for the plugin, either explicitly with <code>protocExecutable</code> plugin configuration parameter,\n                or, preferably, by using protobuf <a href=\"./examples/protobuf-toolchain.html\">toolchain</a>.\n            </answer>\n        </faq>\n\n        <faq id=\"faq_2\">\n            <question>\n                Does the plugin support integration into Eclipse lifecycle?\n            </question>\n            <answer>\n                There is a limited support in the plugin for integration with M2E 1.5 and later.\n                Versions of M2E prior to 1.5 will fail to work with the plugin because of a\n                <a href=\"https://bugs.eclipse.org/bugs/show_bug.cgi?id=422106\">class loading bug</a>.\n\n                <p>Also, if using <code>os-maven-plugin</code> to help resolve binary artifacts,\n                please make sure that you have read\n                <a href=\"https://github.com/trustin/os-maven-plugin/blob/master/README.md#issues-with-eclipse-m2e-or-other-ides\">these important notes</a>.</p>\n            </answer>\n        </faq>\n\n        <!-- TODO -->\n\n    </part>\n</faqs>\n"
  },
  {
    "path": "src/site/site.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n  ~ Copyright (c) 2019 Maven Protocol Buffers Plugin Authors. All rights reserved.\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  -->\n\n<project xmlns=\"http://maven.apache.org/DECORATION/1.3.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/DECORATION/1.3.0 http://maven.apache.org/xsd/decoration-1.3.0.xsd\">\n\n    <body>\n\n        <links>\n            <item name=\"Google Protocol Buffers\" href=\"https://github.com/google/protobuf\"/>\n        </links>\n\n        <menu name=\"Overview\">\n            <item name=\"Introduction\" href=\"index.html\"/>\n            <item name=\"Goals\" href=\"plugin-info.html\"/>\n            <item name=\"Usage\" href=\"usage.html\"/>\n            <item name=\"FAQ\" href=\"faq.html\"/>\n        </menu>\n\n        <menu name=\"Examples\">\n            <!-- TODO -->\n            <item name=\"Resolving Protobuf Dependencies\" href=\"examples/protobuf-dependencies.html\"/>\n            <item name=\"Protobuf Toolchain\" href=\"examples/protobuf-toolchain.html\"/>\n            <item name=\"Protoc Artifact\" href=\"examples/protoc-artifact.html\"/>\n            <item name=\"Custom Protoc Plugins\" href=\"examples/protoc-plugin.html\"/>\n        </menu>\n\n        <menu ref=\"reports\"/>\n    </body>\n</project>\n"
  }
]