├── .gitattributes ├── .github └── workflows │ ├── deploy.yml │ ├── java18.yml │ ├── java19.yml │ ├── java20.yml │ ├── java21.yml │ ├── java22_m4.yml │ ├── java8.yml │ └── java8_m388.yml ├── .gitignore ├── .mvn └── wrapper │ └── maven-wrapper.properties ├── CHANGELOG.adoc ├── CONTRIBUTING.adoc ├── LICENSE-2.0.txt ├── README.adoc ├── docs ├── README.md ├── astro.config.mjs ├── node_modules │ ├── @astrojs │ │ └── starlight │ ├── astro │ └── sharp ├── package.json ├── pnpm-lock.yaml ├── src │ ├── assets │ │ └── houston.webp │ ├── content │ │ ├── config.ts │ │ └── docs │ │ │ ├── guides │ │ │ └── example.md │ │ │ ├── index.mdx │ │ │ ├── introduction │ │ │ ├── about.md │ │ │ ├── using.md │ │ │ └── writing.md │ │ │ └── reference │ │ │ └── example.md │ ├── env.d.ts │ └── styles │ │ └── custom.css └── tsconfig.json ├── jreleaser.yml ├── mvnw ├── mvnw.cmd ├── out └── jreleaser │ ├── output.properties │ ├── release │ └── CHANGELOG.md │ └── trace.log ├── pom.xml ├── pom.xml.versionsBackup └── src ├── it ├── civersion-tiletest-workspace-pom │ ├── pom.xml │ ├── projectAParent │ │ ├── pom.xml │ │ └── projectA │ │ │ └── pom.xml │ ├── projectBParent │ │ ├── pom.xml │ │ └── projectB │ │ │ └── pom.xml │ ├── readme.md │ ├── tile-tile1 │ │ ├── pom.xml │ │ └── tile.xml │ └── verify.bsh ├── civersion-tiletest │ ├── ciparent │ │ └── pom.xml │ ├── dynamic │ │ ├── pom.xml │ │ └── test.properties │ ├── invoker.properties │ ├── noparent │ │ └── pom.xml │ ├── parent1 │ │ └── pom.xml │ ├── parent2 │ │ └── pom.xml │ ├── parent3 │ │ └── pom.xml │ ├── pom.xml │ ├── tile-tile1 │ │ ├── pom.xml │ │ └── tile.xml │ ├── tile-tile2 │ │ ├── pom.xml │ │ └── tile.xml │ ├── tile-tile3 │ │ ├── pom.xml │ │ └── tile.xml │ ├── twoparents │ │ └── pom.xml │ └── verify.bsh ├── distributionManagemetTile │ ├── invoker.properties │ ├── pom.xml │ ├── projectA │ │ └── pom.xml │ ├── tileA │ │ ├── pom.xml │ │ └── tile.xml │ └── verify.bsh ├── order-tests │ ├── pom.xml │ ├── projectA │ │ └── pom.xml │ ├── tileA │ │ ├── pom.xml │ │ └── tile.xml │ ├── tileB │ │ ├── pom.xml │ │ └── tile.xml │ ├── tileC │ │ ├── pom.xml │ │ └── tile.xml │ ├── tileD │ │ ├── pom.xml │ │ └── tile.xml │ └── verify.bsh ├── remoteparent-test │ ├── invoker.properties │ ├── pom.xml │ ├── remoteparent-child │ │ └── pom.xml │ ├── remoteparent-parent │ │ └── pom.xml │ └── verify.bsh ├── settings.xml ├── sitereporting-tiletest │ ├── invoker.properties │ ├── pom.xml │ ├── tile-tile │ │ ├── pom.xml │ │ └── tile.xml │ └── verify.bsh └── spring-boot │ ├── invoker.properties │ ├── pom.xml │ ├── src │ └── main │ │ └── java │ │ └── io │ │ └── repaint │ │ └── Main.java │ └── verify.bsh ├── main ├── groovy │ └── io │ │ └── repaint │ │ └── maven │ │ └── tiles │ │ ├── AbstractTileMojo.groovy │ │ ├── AttachTileMojo.groovy │ │ ├── Constants.groovy │ │ ├── FilteringHelper.groovy │ │ ├── GavUtil.groovy │ │ ├── NotDefaultModelCache.groovy │ │ ├── TileArtifactHandlerProvider.groovy │ │ ├── TileLifecycleMappingProvider.groovy │ │ ├── TileModel.groovy │ │ ├── TileValidator.groovy │ │ ├── TilesMavenLifecycleParticipant.groovy │ │ ├── TilesProjectBuilder.groovy │ │ └── ValidateTileMojo.groovy └── resources │ └── tiles.xsd └── test ├── groovy └── io │ └── repaint │ └── maven │ └── tiles │ ├── AttachTileMojoTest.groovy │ ├── TileModelTest.groovy │ ├── TileValidatorTest.groovy │ └── TilesMavenLifecycleParticipantTest.groovy └── resources ├── antrun1-pom.xml ├── antrun1-tile.xml ├── antrun2-pom.xml ├── antrun2-tile.xml ├── bad-smelly-tile.xml ├── bad-tile.xml ├── duplicate-tile-pom.xml ├── empty-pom.xml ├── execution-id-tile.xml ├── extended-syntax-tile.xml ├── filtering ├── pom.xml └── tile.xml ├── full-tile-load-pom.xml ├── invalid-tile.xml ├── not-a-tile-file.xml ├── release-tile.xml ├── session-license-pom.xml ├── session-license-tile.xml ├── smelly-tile.xml └── test-merge-tile ├── kapt-dinject-tile.xml ├── kapt-javalin-tile.xml ├── kapt-tile.xml └── pom.xml /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | .* text eol=lf 3 | *.sh eol=lf 4 | *.ksh eol=lf 5 | *.list eol=lf 6 | mvnw eol=lf -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy to GitHub Pages 2 | 3 | on: 4 | # Trigger the workflow every time you push to the `main` branch 5 | # Using a different branch name? Replace `main` with your branch’s name 6 | push: 7 | branches: 8 | - master 9 | # Allows you to run this workflow manually from the Actions tab on GitHub. 10 | workflow_dispatch: 11 | 12 | # Allow this job to clone the repo and create a page deployment 13 | permissions: 14 | contents: read 15 | pages: write 16 | id-token: write 17 | 18 | jobs: 19 | build: 20 | runs-on: ubuntu-latest 21 | steps: 22 | - name: Checkout your repository using git 23 | uses: actions/checkout@v3 24 | - name: Install, build, and upload your site 25 | uses: withastro/action@v1 26 | with: 27 | path: docs # The root location of your Astro project inside the repository. (optional) 28 | # node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional) 29 | package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) 30 | 31 | deploy: 32 | needs: build 33 | runs-on: ubuntu-latest 34 | environment: 35 | name: github-pages 36 | url: ${{ steps.deployment.outputs.page_url }} 37 | steps: 38 | - name: Deploy to GitHub Pages 39 | id: deployment 40 | uses: actions/deploy-pages@v1 -------------------------------------------------------------------------------- /.github/workflows/java18.yml: -------------------------------------------------------------------------------- 1 | name: Integration Tests on Java 18 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v3 15 | - name: Set up JDK 18 16 | uses: actions/setup-java@v3 17 | with: 18 | java-version: 18 19 | distribution: 'zulu' 20 | - name: Switch To Maven 3 21 | run: | 22 | echo "distributionUrl=https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.zip" > .mvn/wrapper/maven-wrapper.properties 23 | echo "wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" >> .mvn/wrapper/maven-wrapper.properties 24 | - name: Build with Maven 25 | run: ./mvnw --batch-mode --update-snapshots install -Prun-its 26 | -------------------------------------------------------------------------------- /.github/workflows/java19.yml: -------------------------------------------------------------------------------- 1 | name: Integration Tests on Java 19 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v3 15 | - name: Set up JDK 19 16 | uses: actions/setup-java@v3 17 | with: 18 | java-version: 19 19 | distribution: 'temurin' 20 | - name: Switch To Maven 3 21 | run: | 22 | echo "distributionUrl=https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.zip" > .mvn/wrapper/maven-wrapper.properties 23 | echo "wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" >> .mvn/wrapper/maven-wrapper.properties 24 | - name: Build with Maven 25 | run: ./mvnw --batch-mode --update-snapshots install -Prun-its 26 | -------------------------------------------------------------------------------- /.github/workflows/java20.yml: -------------------------------------------------------------------------------- 1 | name: Integration Tests on Java 20 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v3 15 | - name: Set up JDK 20 16 | uses: actions/setup-java@v3 17 | with: 18 | java-version: 20 19 | distribution: 'temurin' 20 | - name: Switch To Maven 3 21 | run: | 22 | echo "distributionUrl=https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.zip" > .mvn/wrapper/maven-wrapper.properties 23 | echo "wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" >> .mvn/wrapper/maven-wrapper.properties 24 | - name: Build with Maven 25 | run: ./mvnw --batch-mode --update-snapshots install -Prun-its 26 | -------------------------------------------------------------------------------- /.github/workflows/java21.yml: -------------------------------------------------------------------------------- 1 | name: Integration Tests on Java 21 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v3 15 | - name: Set up JDK 21 16 | uses: actions/setup-java@v3 17 | with: 18 | java-version: 21 19 | distribution: 'temurin' 20 | - name: Switch To Maven 3 21 | run: | 22 | echo "distributionUrl=https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.zip" > .mvn/wrapper/maven-wrapper.properties 23 | echo "wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" >> .mvn/wrapper/maven-wrapper.properties 24 | - name: Build with Maven 25 | run: ./mvnw --batch-mode --update-snapshots install -Prun-its 26 | - uses: actions/upload-artifact@v3 27 | if: failure() 28 | with: 29 | name: it-build-logs 30 | path: target/it 31 | -------------------------------------------------------------------------------- /.github/workflows/java22_m4.yml: -------------------------------------------------------------------------------- 1 | name: Integration Tests on Java 22 and Maven 4.0.0-beta-4 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v3 15 | - name: Set up JDK 22 16 | uses: actions/setup-java@v3 17 | with: 18 | distribution: 'zulu' 19 | java-version: 22 20 | - name: Switch To Maven 4 21 | run: | 22 | echo "distributionUrl=https://dlcdn.apache.org/maven/maven-4/4.0.0-beta-4/binaries/apache-maven-4.0.0-beta-4-bin.zip" > .mvn/wrapper/maven-wrapper.properties 23 | echo "wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" >> .mvn/wrapper/maven-wrapper.properties 24 | - name: Build with Maven 25 | run: ./mvnw --batch-mode --update-snapshots install -Prun-its 26 | -------------------------------------------------------------------------------- /.github/workflows/java8.yml: -------------------------------------------------------------------------------- 1 | name: Integration Tests on Java 8 and Maven 3.9.5 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v3 15 | - name: Set up JDK 1.8 16 | uses: actions/setup-java@v3 17 | with: 18 | distribution: 'zulu' 19 | java-version: 8 20 | - name: Switch To Maven 3 21 | run: | 22 | echo "distributionUrl=https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.zip" > .mvn/wrapper/maven-wrapper.properties 23 | echo "wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" >> .mvn/wrapper/maven-wrapper.properties 24 | - name: Build with Maven 25 | run: ./mvnw --batch-mode --update-snapshots install -Prun-its 26 | -------------------------------------------------------------------------------- /.github/workflows/java8_m388.yml: -------------------------------------------------------------------------------- 1 | name: Integration Tests on Java 8 and Maven 3.8.8 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v3 15 | - name: Set up JDK 1.8 16 | uses: actions/setup-java@v3 17 | with: 18 | distribution: 'zulu' 19 | java-version: 8 20 | - name: Switch To Maven 3 21 | run: | 22 | echo "distributionUrl=https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.zip" > .mvn/wrapper/maven-wrapper.properties 23 | echo "wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" >> .mvn/wrapper/maven-wrapper.properties 24 | - name: Build with Maven 25 | run: ./mvnw --batch-mode --update-snapshots install -Prun-its 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore hidden files 2 | .* 3 | **/.* 4 | 5 | # Ignore backups 6 | *.versionsBackup 7 | 8 | # Ignore target directory 9 | target 10 | out 11 | docs/node_modules 12 | 13 | .jj 14 | 15 | 16 | # Don't ignore git special files 17 | !.gitignore 18 | !.gitattributes 19 | !.gitkeep 20 | 21 | !.github 22 | 23 | # and iDEA 24 | *.iml 25 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # https://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip 18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar 19 | -------------------------------------------------------------------------------- /CONTRIBUTING.adoc: -------------------------------------------------------------------------------- 1 | = Tiles Maven Plugin 2 | 3 | == Contributing 4 | 5 | Please take a moment to review this document in order to make the contribution process 6 | easy and effective for everyone involved. 7 | 8 | === Using the issue tracker 9 | 10 | The https://github.com/repaint-io/maven-tiles/issues[issue tracker] is 11 | the preferred channel for reporting all bugs or feature requests for the 12 | plugin. 13 | 14 | * Please **do not** use the issue tracker for personal support requests. 15 | 16 | * Please **do not** use the issue tracker for general http://maven.apache.org[Apache Maven] 17 | related issues. 18 | 19 | * Please **do not** derail or troll issues. Keep the discussion on topic and 20 | respect the opinions of others. 21 | 22 | === Submitting a patch 23 | 24 | Pull requests are accepted and managed via Github but please respect the following restrictions: 25 | 26 | NOTE: **IMPORTANT**: By submitting a patch, you agree to allow the project owners to 27 | license your work under the terms of the Apache 2.0 License. 28 | 29 | Please do not over-commit, make each commit meaningful and consider squashing your commits. We may 30 | ask you to do that before considering merging your commit. Our ideal is one commit per 31 | issue if possible. 32 | 33 | 34 | -------------------------------------------------------------------------------- /LICENSE-2.0.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Starlight Starter Kit: Basics 2 | 3 | [![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build) 4 | 5 | ``` 6 | npm create astro@latest -- --template starlight 7 | ``` 8 | 9 | [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics) 10 | [![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics) 11 | 12 | > 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! 13 | 14 | ## 🚀 Project Structure 15 | 16 | Inside of your Astro + Starlight project, you'll see the following folders and files: 17 | 18 | ``` 19 | . 20 | ├── public/ 21 | ├── src/ 22 | │ ├── assets/ 23 | │ ├── content/ 24 | │ │ ├── docs/ 25 | │ │ └── config.ts 26 | │ └── env.d.ts 27 | ├── astro.config.mjs 28 | ├── package.json 29 | └── tsconfig.json 30 | ``` 31 | 32 | Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name. 33 | 34 | Images can be added to `src/assets/` and embedded in Markdown with a relative link. 35 | 36 | Static assets, like favicons, can be placed in the `public/` directory. 37 | 38 | ## 🧞 Commands 39 | 40 | All commands are run from the root of the project, from a terminal: 41 | 42 | | Command | Action | 43 | | :------------------------ | :----------------------------------------------- | 44 | | `npm install` | Installs dependencies | 45 | | `npm run dev` | Starts local dev server at `localhost:4321` | 46 | | `npm run build` | Build your production site to `./dist/` | 47 | | `npm run preview` | Preview your build locally, before deploying | 48 | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | 49 | | `npm run astro -- --help` | Get help using the Astro CLI | 50 | 51 | ## 👀 Want to learn more? 52 | 53 | Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat). 54 | -------------------------------------------------------------------------------- /docs/astro.config.mjs: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'astro/config'; 2 | import starlight from '@astrojs/starlight'; 3 | 4 | // https://astro.build/config 5 | export default defineConfig({ 6 | site: 'https://repaint-io.github.io', 7 | base: '/maven-tiles', 8 | integrations: [ 9 | starlight({ 10 | title: 'Tiles - Mixins For Apache Maven', 11 | customCss: [ 12 | './src/styles/custom.css', 13 | ], 14 | social: { 15 | github: 'https://github.com/repaint-io/maven-tiles', 16 | }, 17 | sidebar: [ 18 | { 19 | label: 'Maven Tiles', 20 | items: [ 21 | { label: "About", link: '/introduction/about/'}, 22 | { label: "Using", link: '/introduction/using/'}, 23 | { label: "Writing", link: '/introduction/writing/'} 24 | ] 25 | }, 26 | // { 27 | // label: 'Guides', 28 | // items: [ 29 | // // Each item here is one entry in the navigation menu. 30 | // { label: 'Example Guide', link: '/guides/example/' } 31 | // ], 32 | // } 33 | // { 34 | // label: 'Reference', 35 | // autogenerate: { directory: 'reference' }, 36 | // }, 37 | ], 38 | }), 39 | ], 40 | }); 41 | -------------------------------------------------------------------------------- /docs/node_modules/@astrojs/starlight: -------------------------------------------------------------------------------- 1 | ../.pnpm/@astrojs+starlight@0.11.1_astro@4.4.3/node_modules/@astrojs/starlight -------------------------------------------------------------------------------- /docs/node_modules/astro: -------------------------------------------------------------------------------- 1 | .pnpm/astro@4.4.3/node_modules/astro -------------------------------------------------------------------------------- /docs/node_modules/sharp: -------------------------------------------------------------------------------- 1 | .pnpm/sharp@0.32.6/node_modules/sharp -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "maven-tiles", 3 | "type": "module", 4 | "version": "0.0.1", 5 | "scripts": { 6 | "dev": "astro dev", 7 | "start": "astro dev", 8 | "build": "astro build", 9 | "preview": "astro preview", 10 | "astro": "astro" 11 | }, 12 | "dependencies": { 13 | "@astrojs/starlight": "^0.11.1", 14 | "astro": "^4.4.3", 15 | "sharp": "^0.32.6" 16 | }, 17 | "pnpm": { 18 | "overrides": { 19 | "zod@<=3.22.2": ">=3.22.3" 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /docs/src/assets/houston.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/repaint-io/maven-tiles/6cb675f6563adcfda51de834254c11fc069d7db9/docs/src/assets/houston.webp -------------------------------------------------------------------------------- /docs/src/content/config.ts: -------------------------------------------------------------------------------- 1 | import { defineCollection } from 'astro:content'; 2 | import { docsSchema, i18nSchema } from '@astrojs/starlight/schema'; 3 | 4 | export const collections = { 5 | docs: defineCollection({ schema: docsSchema() }), 6 | i18n: defineCollection({ type: 'data', schema: i18nSchema() }), 7 | }; 8 | -------------------------------------------------------------------------------- /docs/src/content/docs/guides/example.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Example Guide 3 | description: A guide in my new Starlight docs site. 4 | --- 5 | 6 | Guides lead a user through a specific task they want to accomplish, often with a sequence of steps. 7 | Writing a good guide requires thinking about what your users are trying to do. 8 | 9 | ## Further reading 10 | 11 | - Read [about how-to guides](https://diataxis.fr/how-to-guides/) in the Diátaxis framework 12 | -------------------------------------------------------------------------------- /docs/src/content/docs/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tiles for Apache Maven 3 | description: Modular Mixins for the Apache Maven build system 4 | template: splash 5 | hero: 6 | tagline: Giving a fresh coat of paint to your Maven builds 7 | image: 8 | file: ../../assets/houston.webp 9 | actions: 10 | - text: Read the Tiles docs 11 | link: /maven-tiles/introduction/about 12 | icon: right-arrow 13 | variant: primary 14 | --- 15 | 16 | import { Card, CardGrid } from '@astrojs/starlight/components'; 17 | -------------------------------------------------------------------------------- /docs/src/content/docs/introduction/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | description: A Project Mixin Implementation for Apache Maven 4 | --- 5 | 6 | The _tiles-maven-plugin_ is a Maven Plugin that brings a **modular**, **composition** based appraoch to Apache Maven builds. 7 | 8 | ## How do I make a Maven Tile? 9 | 10 | Tiles are [plain Maven pom artifacts](https://github.com/maoo/maven-tiles-examples/tree/master/tiles) which contain parts of a Maven POM; every tile can contain 11 | 12 | * build data, for example the license tags that a company wants to report on all their artifacts 13 | * build aspects, for example the configurations of a plugin, such as Groovy, Java or Clojure. 14 | * release aspects, for example the distribution management section 15 | * references to other tiles 16 | 17 | This could, for example, allow you to have build aspects consistent across your organization and open sourced, and the distribution of internal vs external artifacts kept in a single tile. 18 | 19 | In the current single parent hierarchy, this is all duplicated. 20 | 21 | ## Where can't I use a Maven Tile? 22 | 23 | The following are Repaint project definitions: 24 | 25 | * **define: reactor build** - `pom.xml` that contains only modules, no plugins, 26 | no dependencies, no dependency management, no plugin management. These are used as shortcuts to get your full project installed or tested. 27 | * **define: multi-module build** - `pom.xml` that contains plugins and/or dependencies, dependency management, plugin management. 28 | 29 | With those defined: 30 | 31 | * You can use a tile in a reactor or multi-module build where the tile is a module and (a) only used in the other modules or (b) used in the parent with the inherits config turned off (so it is not inherited by the children). This is a side effect of how Maven works and we cannot work around it. 32 | * We do not prioritize issues raised where you are using a multi-module build. These are the anti-thesis of Repaint.IO’s philosophy of composition over inheritance. If you raise the issue and it seems a reasonable use case we will look at it, but please be aware that it is unlikely to be looked at by us without an explicit reproducible test case. 33 | 34 | ## Execution Ids 35 | 36 | Execution ids within tiles are prepended with the gav parameters of the tile that included the execution, for easier debugging/tracing. 37 | 38 | If this is not desired, adding a configuration attribute `tiles-keep-id="true"` or entry 39 | `true` will keep the original id. If you are using the _Kotlin Maven plugin_, you will need to use this or it will not work. 40 | 41 | **tile.xml** 42 | 43 | ```xml 44 | 45 | 46 | 4.0.0 47 | 48 | 49 | 50 | test 51 | test 52 | 1.0 53 | 54 | 55 | 1 56 | 57 | 58 | 2 59 | 60 | 61 | 62 | 3 63 | 64 | true 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | test 74 | 75 | 76 | 77 | test 78 | test 79 | 1.0 80 | 81 | 82 | 4 83 | 84 | 85 | 5 86 | 87 | 88 | 89 | 6 90 | 91 | true 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | ``` 102 | 103 | In the above tile, executions with ids 1 and 4 will have their ids changed to 104 | `io.repaint.tiles:execution-id-replacing-tile:1.1-SNAPSHOT::1` and 105 | `io.repaint.tiles:execution-id-replacing-tile:1.1-SNAPSHOT::4` respectively, while executions with ids 2, 3, 5 and 6 106 | will retain their original execution id. 107 | 108 | ## Build Smells 109 | 110 | When migrating from a parent structure, it is worthwhile to take the opportunity to reduce your build smells. 111 | 112 | You can do this gradually or in one go, depending on how your builds are done. By default, the plugin will strip all bad smells. 113 | 114 | The following is an explanation of what is stripped and why those smells are bad. Richard and Mark will be putting together a short book with tutorials for a better approach to building using Maven, but this is the short explanation. 115 | 116 | Note, these are only cleaned from the `tile.xml``, not from your `pom.xml``. 117 | 118 | * **dependencymanagement** - this was always a poor substitute for composite poms. Composite poms - aka a pom only release 119 | artifact that stores all related dependencies together. This allows your project to pull in only those dependencies 120 | that it actually requires for release, and allow them to be directly overridden. Dependency management is only 121 | for declaring the version of an artifact, and not that it is a dependency - it is better and more composable to 122 | declare this specifically in a composite pom instead. Use version ranges so changes flow through. 123 | * **pluginrepositories** and **repositories** - see [Repositories in POMs is a bad idea](http://blog.sonatype.com/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea/) - this has always 124 | been a bad idea. Get rid of it as soon as possible. 125 | * **dependencies** - putting them in a parent or tile prevents your user from exclusion, again composites are a much, much 126 | better idea here. Just don’t use this section anywhere other than your actual artifact or composite poms. 127 | 128 | Almost made a build smell: 129 | - **pluginmanagement** - plugin management is used in parents to define all of the necessary options for a plugin but 130 | not have that plugin actually run during the release of the parent artifact, and also give the child the option of 131 | running it. The reason this is bad is that it is mostly not necessary. You should split your plugins up into tiles 132 | so that they be pulled into a build as a standalone set of functionality that will always run and be properly configured. 133 | Since they will reside in the tile.xml file, they will not be run when the tile is released. However, some plugins are 134 | never run automatically - release and enforcer are two examples. These make sense to stay in pluginManagement. 135 | 136 | If you need to use them, add them to your configuration section: 137 | 138 | **pom.xml** 139 | 140 | ```xml 141 | 142 | 4.0.0 143 | 144 | 145 | io.repaint.maven 146 | tiles-maven-plugin 147 | 2.40 148 | 149 | dependencymanagement, dependencies, repositories, pluginrepositories 150 | 151 | groupid:antrun1-tile:1.1-SNAPSHOT 152 | groupid:antrun2-tile:1.1-SNAPSHOT 153 | 154 | 155 | 156 | 157 | 158 | ``` 159 | 160 | ## Parent structure 161 | 162 | Tiles will always be applied as parents of the project that is built. Any orignal parent of that project will be added 163 | as the parent of the last applied tile. So if you apply Tiles `T1` and `T2` to a project `X` with a parent `P`, the 164 | resulting hierarchy will be `X` - `T1` - `T2` - `P`. Thus (see section _Additional Notes_), the definitions in the parent 165 | can be overwritten by a tile, but not the other way around. 166 | 167 | However, there are situations where you want to define your tiles in a parent, e.g. when you have a lot of artifacts 168 | that are built in the same way. In this case you would want a structure like this: `X` - `P` - `T1` - `T2`. While you’d 169 | maybe expect it to work this way if the tiles are included in `P`, due to the way Maven works there’s no way to know 170 | where a configuration comes from. To still enable this use case you can manually choose a parent where the tiles will 171 | be applied (in this case before `P`) resulting in the desired structure: 172 | 173 | **pom.xml** 174 | 175 | ```xml 176 | 177 | group 178 | P 179 | 1.0.0 180 | 181 | X 182 | ... 183 | 184 | 185 | 186 | io.repaint.maven 187 | tiles-maven-plugin 188 | 2.40 189 | 190 | group:P 191 | 192 | group:T1:1.0.0 193 | group:T2:1.0.0 194 | 195 | 196 | 197 | 198 | 199 | ``` 200 | 201 | ## Tile Ordering 202 | 203 | In v2.19 and earlier, all tiles declared inside tiles are loaded after all tiles declared in the project. This meant 204 | that all tiles declared inside tiles became ancestors to all tiles declared in the project. 205 | 206 | In v2.20+, tile ordering has changed. All tiles are now loaded in order of when they are declared, recursively tracing 207 | from tiles declared in a project down to the tiles declared within tiles. 208 | 209 | Suppose your project declares tiles `T1` and `T2` and the `T1` tile declares tile `T3`. Earlier versions will load 210 | these in the order `T1`, `T2`, and then `T3`. Using the notation used earlier on this page, this results in the Maven 211 | project ancestry of `X` - `T3` - `T2` - `T1` - `P`. Later versions will load them in the order `T1`, `T3`, and then 212 | `T2`. This results in the Maven project ancestry of `X` - `T2` - `T3` - `T1` - `P`. 213 | 214 | In some cases, your project and tile hierarchy will include duplicate declaration of one tile. In these cases, the 215 | tile is only included once. The latest declaration is used, resulting it showing up in the Maven project 216 | ancestry as the one closest to the parent `P`. This guarantees it will be an ancestor to all tiles that included it. 217 | 218 | ## Mojos 219 | 220 | There are two mojos in the plugin, attach-tile and validate. attach-tile is only used by the deploy/install 221 | process and attaches the tile.xml. validate is for your use to ensure your tile is valid before releasing it - this 222 | ensures it can be read and any errors or warnings about content will appear. 223 | 224 | ## Additional Notes 225 | 226 | Some interesting notes: 227 | 228 | * Tiles support version ranges, so use them. [1.1, 2) allows you to update and release new versions of tiles and have them 229 | propagate out. Maven 3.2.2 allows this with the version ranges in parents, but it isn’t a good solution because of single 230 | inheritance. 231 | * You can include as many tiles as you like in a pom and tiles can refer to other tiles. The plugin will search through 232 | the poms, telling you which ones it is picking up and then load their configurations in **reverse order**. This means the 233 | poms _closer_ to your artifact get their definitions being the most important ones. If you have duplicate plugins, the one 234 | closest to your pom wins. 235 | * String interpolation for properties works. The plugin first walks the tree of tiles collecting all properties, merges them 236 | together (closest wins), and then reloads the poms and interpolates them. This means all string replacement in plugins and 237 | dependencies works as expected. 238 | * Plugin execution is merged - if you have the same plugin in two different tiles define two different executions, they will 239 | merge. 240 | * The plugin works fine with alternative packaging. It has been tested with war, grails-plugin and grails-app. 241 | 242 | ## Final Notes 243 | 244 | Tiles-Maven works best when **you** and **your team** own the tiles. I don’t recommend relying on open source tiles, always 245 | create your own versions and always lock down versions of third party tiles, just like you would third party dependencies. 246 | 247 | ## Read More 248 | 249 | * [The Original Tiles Maven plugin](https://github.com/maoo/maven-tiles) - although the essential start point is the same, the code is significantly different. 250 | * [Mixin POM fragments](http://jira.codehaus.org/browse/MNG-5102) 251 | * [Stack Overflow](http://stackoverflow.com/questions/11749375/import-maven-plugin-configuration-by-composition-rather-than-inheritance-can-it) 252 | * [Maven Discussion](http://maven.40175.n5.nabble.com/Moving-forward-with-mixins-tc4421069.html) 253 | -------------------------------------------------------------------------------- /docs/src/content/docs/introduction/using.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Using Tiles 3 | description: How to use Maven Tiles 4 | --- 5 | 6 | ...how do do use tiles... 7 | 8 | 9 | ## Composing Build functionality 10 | 11 | As a use case, an example of how it will be used for my projects. 12 | 13 | Richard will have: 14 | 15 | * **java8-tile** - for those projects that are on Java 8 16 | * **java11-tile** - for those projects that are on Java LTS (11) 17 | * **groovy-tile** - which defines the build structure necessary to build a Groovy project, including GMavenPlus, GroovyDoc 18 | and Source plugins 19 | * **java-tile** - for Java only projects which include all the Javadoc and Source plugins 20 | * **s3-tile** - for our Servlet3 modules, which includes Sass, JSP compilation and Karma plugins and depends on the groovy-tile 21 | * **github-release-tile** - for artifacts that release to Github (open source) 22 | * **nexus-release-tile** - for artifacts that release to our local Nexus (not open source) 23 | 24 | This allows me to open source all my tiles except for the nexus tile, and then decide in the final artifact where I will 25 | release it. 26 | -------------------------------------------------------------------------------- /docs/src/content/docs/introduction/writing.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Writing a Maven Tile 3 | description: How to write a Maven Tile 4 | --- 5 | 6 | A Maven Tile is made up of a `pom.xml` and a `tile.xml`. 7 | 8 | The `pom.xml` is a basic Maven project using the packaging type of `tile`, and the inclusion of the `tiles-maven-plugin`, along with release plugin configuration (often coming itself from a tile). 9 | 10 | The POM would be minimal, only declaring the `name`, `groupId`, `artifactId`, `version`, `description`, and `packaging` (tile) attributes and generally only a declaration of the Maven Tiles plugin. 11 | 12 | The tiles plugin will only have a `configuration` element defined when using other tiles (generally, you use at least one - a release tile). 13 | 14 | **pom.xml** 15 | 16 | ```xml 17 | 18 | io.repaint.maven 19 | license-tile 20 | 1.1-SNAPSHOT 21 | tile 22 | Contains consistent license information. 23 | 4.0.0 24 | 25 | 26 | 27 | 28 | io.repaint.maven 29 | tiles-maven-plugin 30 | 2.37 31 | true 32 | 33 | false 34 | 35 | io.repaint.tiles:github-release-tile:[1.1, 2) 36 | 37 | 38 | 39 | 40 | 41 | 42 | ``` 43 | 44 | With the packaging `tile`, the plugin will look for the attached `tile.xml``, do some basic validation on it and attach it as an artifact. 45 | 46 | When the `` configuration item is specified as `true` - then standard Maven resource filtering for `@project.version@` style references is applied to the `tile.xml` file prior to install/deploy. 47 | 48 | **tile.xml** 49 | 50 | ```xml 51 | 52 | 53 | 4.0.0 54 | 55 | 56 | The Apache Software License, Version 2.0 57 | http://www.apache.org/licenses/LICENSE-2.0.txt 58 | repo 59 | 60 | 61 | 62 | ``` 63 | 64 | ## Using Snapshots of Tiles 65 | 66 | `-SNAPSHOT` versions of tiles work when installed into your local `~/.m2/repository`, however - if you wish to use a _published_ SNAPSHOT - you will need to declare a `` in your `pom.xml` that support SNAPSHOTs. 67 | 68 | Review the [introduction to repositories](https://maven.apache.org/guides/introduction/introduction-to-repositories.html) section on the Apache Maven website. 69 | 70 | If you don’t wish to include `` definitions in your project source, declaring them in an activated `` in your `~/.m2/settings.xml` file is a viable alternative. 71 | 72 | **📌 NOTE**\ 73 | This introduces an element of inconsistentcy/non-reproducability to your build and should be done with care. 74 | 75 | ## Transcluding Tiles 76 | 77 | A tile can define the tiles plugin if it wishes to cascade tile inclusion, or it can use the extended `tile.xml` syntax: 78 | 79 | **tile.xml** 80 | 81 | ```xml 82 | 83 | 84 | 4.0.0 85 | 86 | 87 | The Apache Software License, Version 2.0 88 | http://www.apache.org/licenses/LICENSE-2.0.txt 89 | repo 90 | 91 | 92 | 93 | 94 | io.repaint.tiles:ratpack-tile:[1,2) 95 | 96 | 97 | 98 | ``` 99 | 100 | Although this will appear to not validate when editing in an IDE, the tile plugin will strip off the `tiles` section when processing and use it directly. 101 | 102 | -------------------------------------------------------------------------------- /docs/src/content/docs/reference/example.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Example Reference 3 | description: A reference page in my new Starlight docs site. 4 | --- 5 | 6 | Reference pages are ideal for outlining how things work in terse and clear terms. 7 | Less concerned with telling a story or addressing a specific use case, they should give a comprehensive outline of what your documenting. 8 | 9 | ## Further reading 10 | 11 | - Read [about reference](https://diataxis.fr/reference/) in the Diátaxis framework 12 | -------------------------------------------------------------------------------- /docs/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /docs/src/styles/custom.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --sl-content-width: 60rem; 3 | --sl-line-height: 1.3rem; 4 | --sl-text-sm: 10pt; 5 | } 6 | -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "astro/tsconfigs/strict" 3 | } -------------------------------------------------------------------------------- /jreleaser.yml: -------------------------------------------------------------------------------- 1 | project: 2 | name: tiles-maven-plugin 3 | description: Tiles Maven Plugin 4 | longDescription: Project Mixins for Apache Maven 5 | version: "2.40" 6 | links: 7 | homepage: https://github.com/repaint-io/maven-tiles 8 | authors: 9 | - Mark Derricutt 10 | - Richard Vowles 11 | license: APACHE-2.0 12 | inceptionYear: "2014" 13 | stereotype: NONE 14 | java: 15 | version: "8" 16 | groupId: io.repaint.maven 17 | artifactId: tiles-maven-plugin 18 | 19 | release: 20 | github: 21 | overwrite: true 22 | tagName: tiles-maven-plugin-{{projectVersion}} 23 | changelog: 24 | skipMergeCommits: true 25 | formatted: ALWAYS 26 | preset: conventional-commits 27 | contributors: 28 | format: '- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}' 29 | -------------------------------------------------------------------------------- /mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Apache Maven Wrapper startup batch script, version 3.1.1 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | # e.g. to debug Maven itself, use 32 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | # ---------------------------------------------------------------------------- 35 | 36 | if [ -z "$MAVEN_SKIP_RC" ] ; then 37 | 38 | if [ -f /usr/local/etc/mavenrc ] ; then 39 | . /usr/local/etc/mavenrc 40 | fi 41 | 42 | if [ -f /etc/mavenrc ] ; then 43 | . /etc/mavenrc 44 | fi 45 | 46 | if [ -f "$HOME/.mavenrc" ] ; then 47 | . "$HOME/.mavenrc" 48 | fi 49 | 50 | fi 51 | 52 | # OS specific support. $var _must_ be set to either true or false. 53 | cygwin=false; 54 | darwin=false; 55 | mingw=false 56 | case "`uname`" in 57 | CYGWIN*) cygwin=true ;; 58 | MINGW*) mingw=true;; 59 | Darwin*) darwin=true 60 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 61 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 62 | if [ -z "$JAVA_HOME" ]; then 63 | if [ -x "/usr/libexec/java_home" ]; then 64 | JAVA_HOME="`/usr/libexec/java_home`"; export JAVA_HOME 65 | else 66 | JAVA_HOME="/Library/Java/Home"; export JAVA_HOME 67 | fi 68 | fi 69 | ;; 70 | esac 71 | 72 | if [ -z "$JAVA_HOME" ] ; then 73 | if [ -r /etc/gentoo-release ] ; then 74 | JAVA_HOME=`java-config --jre-home` 75 | fi 76 | fi 77 | 78 | # For Cygwin, ensure paths are in UNIX format before anything is touched 79 | if $cygwin ; then 80 | [ -n "$JAVA_HOME" ] && 81 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 82 | [ -n "$CLASSPATH" ] && 83 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 84 | fi 85 | 86 | # For Mingw, ensure paths are in UNIX format before anything is touched 87 | if $mingw ; then 88 | [ -n "$JAVA_HOME" ] && 89 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 90 | fi 91 | 92 | if [ -z "$JAVA_HOME" ]; then 93 | javaExecutable="`which javac`" 94 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 95 | # readlink(1) is not available as standard on Solaris 10. 96 | readLink=`which readlink` 97 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 98 | if $darwin ; then 99 | javaHome="`dirname \"$javaExecutable\"`" 100 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 101 | else 102 | javaExecutable="`readlink -f \"$javaExecutable\"`" 103 | fi 104 | javaHome="`dirname \"$javaExecutable\"`" 105 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 106 | JAVA_HOME="$javaHome" 107 | export JAVA_HOME 108 | fi 109 | fi 110 | fi 111 | 112 | if [ -z "$JAVACMD" ] ; then 113 | if [ -n "$JAVA_HOME" ] ; then 114 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 115 | # IBM's JDK on AIX uses strange locations for the executables 116 | JAVACMD="$JAVA_HOME/jre/sh/java" 117 | else 118 | JAVACMD="$JAVA_HOME/bin/java" 119 | fi 120 | else 121 | JAVACMD="`\\unset -f command; \\command -v java`" 122 | fi 123 | fi 124 | 125 | if [ ! -x "$JAVACMD" ] ; then 126 | echo "Error: JAVA_HOME is not defined correctly." >&2 127 | echo " We cannot execute $JAVACMD" >&2 128 | exit 1 129 | fi 130 | 131 | if [ -z "$JAVA_HOME" ] ; then 132 | echo "Warning: JAVA_HOME environment variable is not set." 133 | fi 134 | 135 | # traverses directory structure from process work directory to filesystem root 136 | # first directory with .mvn subdirectory is considered project base directory 137 | find_maven_basedir() { 138 | if [ -z "$1" ] 139 | then 140 | echo "Path not specified to find_maven_basedir" 141 | return 1 142 | fi 143 | 144 | basedir="$1" 145 | wdir="$1" 146 | while [ "$wdir" != '/' ] ; do 147 | if [ -d "$wdir"/.mvn ] ; then 148 | basedir=$wdir 149 | break 150 | fi 151 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 152 | if [ -d "${wdir}" ]; then 153 | wdir=`cd "$wdir/.."; pwd` 154 | fi 155 | # end of workaround 156 | done 157 | printf '%s' "$(cd "$basedir"; pwd)" 158 | } 159 | 160 | # concatenates all lines of a file 161 | concat_lines() { 162 | if [ -f "$1" ]; then 163 | echo "$(tr -s '\n' ' ' < "$1")" 164 | fi 165 | } 166 | 167 | BASE_DIR=$(find_maven_basedir "$(dirname $0)") 168 | if [ -z "$BASE_DIR" ]; then 169 | exit 1; 170 | fi 171 | 172 | MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR 173 | if [ "$MVNW_VERBOSE" = true ]; then 174 | echo $MAVEN_PROJECTBASEDIR 175 | fi 176 | 177 | ########################################################################################## 178 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 179 | # This allows using the maven wrapper in projects that prohibit checking in binary data. 180 | ########################################################################################## 181 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then 182 | if [ "$MVNW_VERBOSE" = true ]; then 183 | echo "Found .mvn/wrapper/maven-wrapper.jar" 184 | fi 185 | else 186 | if [ "$MVNW_VERBOSE" = true ]; then 187 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." 188 | fi 189 | if [ -n "$MVNW_REPOURL" ]; then 190 | wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" 191 | else 192 | wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" 193 | fi 194 | while IFS="=" read key value; do 195 | case "$key" in (wrapperUrl) wrapperUrl="$value"; break ;; 196 | esac 197 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" 198 | if [ "$MVNW_VERBOSE" = true ]; then 199 | echo "Downloading from: $wrapperUrl" 200 | fi 201 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" 202 | if $cygwin; then 203 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` 204 | fi 205 | 206 | if command -v wget > /dev/null; then 207 | QUIET="--quiet" 208 | if [ "$MVNW_VERBOSE" = true ]; then 209 | echo "Found wget ... using wget" 210 | QUIET="" 211 | fi 212 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 213 | wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" 214 | else 215 | wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" 216 | fi 217 | [ $? -eq 0 ] || rm -f "$wrapperJarPath" 218 | elif command -v curl > /dev/null; then 219 | QUIET="--silent" 220 | if [ "$MVNW_VERBOSE" = true ]; then 221 | echo "Found curl ... using curl" 222 | QUIET="" 223 | fi 224 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 225 | curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L 226 | else 227 | curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L 228 | fi 229 | [ $? -eq 0 ] || rm -f "$wrapperJarPath" 230 | else 231 | if [ "$MVNW_VERBOSE" = true ]; then 232 | echo "Falling back to using Java to download" 233 | fi 234 | javaSource="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" 235 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" 236 | # For Cygwin, switch paths to Windows format before running javac 237 | if $cygwin; then 238 | javaSource=`cygpath --path --windows "$javaSource"` 239 | javaClass=`cygpath --path --windows "$javaClass"` 240 | fi 241 | if [ -e "$javaSource" ]; then 242 | if [ ! -e "$javaClass" ]; then 243 | if [ "$MVNW_VERBOSE" = true ]; then 244 | echo " - Compiling MavenWrapperDownloader.java ..." 245 | fi 246 | # Compiling the Java class 247 | ("$JAVA_HOME/bin/javac" "$javaSource") 248 | fi 249 | if [ -e "$javaClass" ]; then 250 | # Running the downloader 251 | if [ "$MVNW_VERBOSE" = true ]; then 252 | echo " - Running MavenWrapperDownloader.java ..." 253 | fi 254 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") 255 | fi 256 | fi 257 | fi 258 | fi 259 | ########################################################################################## 260 | # End of extension 261 | ########################################################################################## 262 | 263 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 264 | 265 | # For Cygwin, switch paths to Windows format before running java 266 | if $cygwin; then 267 | [ -n "$JAVA_HOME" ] && 268 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 269 | [ -n "$CLASSPATH" ] && 270 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 271 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 272 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 273 | fi 274 | 275 | # Provide a "standardized" way to retrieve the CLI args that will 276 | # work with both Windows and non-Windows executions. 277 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" 278 | export MAVEN_CMD_LINE_ARGS 279 | 280 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 281 | 282 | exec "$JAVACMD" \ 283 | $MAVEN_OPTS \ 284 | $MAVEN_DEBUG_OPTS \ 285 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 286 | "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 287 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 288 | -------------------------------------------------------------------------------- /mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM http://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Apache Maven Wrapper startup batch script, version 3.1.1 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 28 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 29 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 30 | @REM e.g. to debug Maven itself, use 31 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 32 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 33 | @REM ---------------------------------------------------------------------------- 34 | 35 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 36 | @echo off 37 | @REM set title of command window 38 | title %0 39 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 40 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 41 | 42 | @REM set %HOME% to equivalent of $HOME 43 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 44 | 45 | @REM Execute a user defined script before this one 46 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 47 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 48 | if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* 49 | if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* 50 | :skipRcPre 51 | 52 | @setlocal 53 | 54 | set ERROR_CODE=0 55 | 56 | @REM To isolate internal variables from possible post scripts, we use another setlocal 57 | @setlocal 58 | 59 | @REM ==== START VALIDATION ==== 60 | if not "%JAVA_HOME%" == "" goto OkJHome 61 | 62 | echo. 63 | echo Error: JAVA_HOME not found in your environment. >&2 64 | echo Please set the JAVA_HOME variable in your environment to match the >&2 65 | echo location of your Java installation. >&2 66 | echo. 67 | goto error 68 | 69 | :OkJHome 70 | if exist "%JAVA_HOME%\bin\java.exe" goto init 71 | 72 | echo. 73 | echo Error: JAVA_HOME is set to an invalid directory. >&2 74 | echo JAVA_HOME = "%JAVA_HOME%" >&2 75 | echo Please set the JAVA_HOME variable in your environment to match the >&2 76 | echo location of your Java installation. >&2 77 | echo. 78 | goto error 79 | 80 | @REM ==== END VALIDATION ==== 81 | 82 | :init 83 | 84 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 85 | @REM Fallback to current working directory if not found. 86 | 87 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 88 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 89 | 90 | set EXEC_DIR=%CD% 91 | set WDIR=%EXEC_DIR% 92 | :findBaseDir 93 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 94 | cd .. 95 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 96 | set WDIR=%CD% 97 | goto findBaseDir 98 | 99 | :baseDirFound 100 | set MAVEN_PROJECTBASEDIR=%WDIR% 101 | cd "%EXEC_DIR%" 102 | goto endDetectBaseDir 103 | 104 | :baseDirNotFound 105 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 106 | cd "%EXEC_DIR%" 107 | 108 | :endDetectBaseDir 109 | 110 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 111 | 112 | @setlocal EnableExtensions EnableDelayedExpansion 113 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 114 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 115 | 116 | :endReadAdditionalConfig 117 | 118 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 119 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 120 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 121 | 122 | set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" 123 | 124 | FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 125 | IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B 126 | ) 127 | 128 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 129 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 130 | if exist %WRAPPER_JAR% ( 131 | if "%MVNW_VERBOSE%" == "true" ( 132 | echo Found %WRAPPER_JAR% 133 | ) 134 | ) else ( 135 | if not "%MVNW_REPOURL%" == "" ( 136 | SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar" 137 | ) 138 | if "%MVNW_VERBOSE%" == "true" ( 139 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 140 | echo Downloading from: %WRAPPER_URL% 141 | ) 142 | 143 | powershell -Command "&{"^ 144 | "$webclient = new-object System.Net.WebClient;"^ 145 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 146 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 147 | "}"^ 148 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ 149 | "}" 150 | if "%MVNW_VERBOSE%" == "true" ( 151 | echo Finished downloading %WRAPPER_JAR% 152 | ) 153 | ) 154 | @REM End of extension 155 | 156 | @REM Provide a "standardized" way to retrieve the CLI args that will 157 | @REM work with both Windows and non-Windows executions. 158 | set MAVEN_CMD_LINE_ARGS=%* 159 | 160 | %MAVEN_JAVA_EXE% ^ 161 | %JVM_CONFIG_MAVEN_PROPS% ^ 162 | %MAVEN_OPTS% ^ 163 | %MAVEN_DEBUG_OPTS% ^ 164 | -classpath %WRAPPER_JAR% ^ 165 | "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ 166 | %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 167 | if ERRORLEVEL 1 goto error 168 | goto end 169 | 170 | :error 171 | set ERROR_CODE=1 172 | 173 | :end 174 | @endlocal & set ERROR_CODE=%ERROR_CODE% 175 | 176 | if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost 177 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 178 | if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" 179 | if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" 180 | :skipRcPost 181 | 182 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 183 | if "%MAVEN_BATCH_PAUSE%"=="on" pause 184 | 185 | if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% 186 | 187 | cmd /C exit /B %ERROR_CODE% 188 | -------------------------------------------------------------------------------- /out/jreleaser/output.properties: -------------------------------------------------------------------------------- 1 | #JReleaser 1.9.0 2 | #Tue Dec 12 11:15:36 NZDT 2023 3 | commitFullHash=92eedcf655baa622ed581e49ef45f16d1ee3a08b 4 | commitShortHash=92eedcf 5 | javaVendor=Temurin 6 | javaVersion=1.8.0_392 7 | javaVmVersion=25.392-b08 8 | milestoneName=tiles-maven-plugin-2.40 9 | platform=osx-x86_64 10 | platformReplaced=osx-x86_64 11 | previousTagName=tiles-maven-plugin-2.39 12 | projectName=tiles-maven-plugin 13 | projectSnapshot=false 14 | projectVersion=2.40 15 | projectVersionMajor=2 16 | projectVersionMinor=40 17 | projectVersionNumber=2.40 18 | releaseBranch=master 19 | releaseName=Release tiles-maven-plugin-2.40 20 | tagName=tiles-maven-plugin-2.40 21 | timestamp=2023-12-12T11\:15\:31.088+13\:00 22 | -------------------------------------------------------------------------------- /out/jreleaser/release/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## Changelog 2 | 3 | ## 🛠 Build 4 | - b570011 Drop jrelease:release from release (for now) 5 | 6 | ## 📝 Documentation 7 | - 4f48a81 Updated README/CHANGELOG 8 | 9 | --- 10 | - f3cf8b9 [maven-release-plugin] prepare release tiles-maven-plugin-2.40 11 | - 2860198 Added jrelease maven plugin 12 | - 7380278 Fixing an issue with distribution management repositories losing authentication settings. 13 | - 804efcf Fixing an issue with distribution management repositories losing authentication settings. 14 | - e5bedd5 Fixing an issue with distribution management repositories losing authentication settings. 15 | - 66f6450 Bump vite from 4.4.11 to 4.5.1 in /docs (#151), closes #151 16 | - 0c28d93 explicitely define m-jar-p version (#150), closes #150 17 | 18 | 19 | ## Contributors 20 | We'd like to thank the following people for their contributions: 21 | - GitHub 22 | - Hervé Boutemy ([@hboutemy](https://github.com/hboutemy)) 23 | - Mark Derricutt ([@talios](https://github.com/talios)) 24 | - Riesen, Stefan 25 | - dependabot[bot] ([@dependabot[bot]](https://github.com/apps/dependabot)) -------------------------------------------------------------------------------- /src/it/civersion-tiletest-workspace-pom/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.test 7 | civersion-workspace-test 8 | SNAPSHOT 9 | 10 | pom 11 | 12 | CI Friendly Build Version Maven Tiles Test 13 | 14 | 15 | 16 | tile-tile1 17 | projectBParent 18 | projectAParent 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest-workspace-pom/projectAParent/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.test 7 | civersion-tiletest-projectAParent 8 | ${revision} 9 | 10 | pom 11 | 12 | 13 | SNAPSHOT-1 14 | 15 | 16 | CI Friendly Build Version Maven Tiles Test - ProjectAParent 17 | 18 | 19 | projectA 20 | 21 | 22 | 23 | 24 | 25 | org.codehaus.mojo 26 | flatten-maven-plugin 27 | 1.1.0 28 | 29 | true 30 | resolveCiFriendliesOnly 31 | 32 | 33 | 34 | flatten 35 | process-resources 36 | 37 | flatten 38 | 39 | 40 | 41 | flatten.clean 42 | clean 43 | 44 | clean 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest-workspace-pom/projectAParent/projectA/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | 8 | com.test 9 | civersion-tiletest-projectAParent 10 | ${revision} 11 | 12 | 13 | com.test 14 | civersion-tiletest-projectA 15 | 16 | jar 17 | 18 | CI Friendly Build Version Maven Tiles Test - ProjectA 19 | 20 | 21 | 22 | civersion-tiletest-projectB 23 | com.test 24 | SNAPSHOT-1 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | io.repaint.maven 33 | tiles-maven-plugin 34 | @project.version@ 35 | 36 | 37 | com.test:civersion-tiletest-workspace-tile1:1 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest-workspace-pom/projectBParent/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.test 7 | civersion-tiletest-projectBParent 8 | ${revision} 9 | 10 | pom 11 | 12 | 13 | SNAPSHOT-1 14 | 15 | 16 | CI Friendly Build Version Maven Tiles Test - ProjectBParent 17 | 18 | 19 | projectB 20 | 21 | 22 | 23 | 24 | 25 | org.codehaus.mojo 26 | flatten-maven-plugin 27 | 1.1.0 28 | 29 | true 30 | resolveCiFriendliesOnly 31 | 32 | 33 | 34 | flatten 35 | process-resources 36 | 37 | flatten 38 | 39 | 40 | 41 | flatten.clean 42 | clean 43 | 44 | clean 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest-workspace-pom/projectBParent/projectB/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | com.test 8 | civersion-tiletest-projectBParent 9 | ${revision} 10 | 11 | 12 | com.test 13 | civersion-tiletest-projectB 14 | 15 | 16 | jar 17 | 18 | CI Friendly Build Version Maven Tiles Test - ProjectB 19 | 20 | 21 | 22 | 23 | io.repaint.maven 24 | tiles-maven-plugin 25 | @project.version@ 26 | 27 | 28 | com.test:civersion-tiletest-workspace-tile1:1 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest-workspace-pom/readme.md: -------------------------------------------------------------------------------- 1 | Setup is: 2 | ProjectA is built by ProjectAParent 3 | ProjectB is built by ProjectBParent 4 | Both use ${revision] 5 | 6 | 7 | ProjectA has a dependency to ProjectB 8 | 9 | We use a "workspace pom" for Eclipse the references these modules. 10 | 11 | 12 | To reproduce the error: 13 | run mvn install on pom.xml 14 | 15 | 16 | 17 | The error log is: 18 | 19 | [INFO] Scanning for projects... 20 | [WARNING] 21 | [WARNING] Some problems were encountered while building the effective model for com.test:civersion-workspace-test:pom:SNAPSHOT 22 | [WARNING] 'version' uses an unsupported snapshot version format, should be '*-SNAPSHOT' instead. @ line 8, column 12 23 | [WARNING] 24 | [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. 25 | [WARNING] 26 | [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. 27 | [WARNING] 28 | [INFO] --- tiles-maven-plugin: Injecting 1 tiles as intermediary parent artifacts for com.test:civersion-tiletest-projectB... 29 | [INFO] Mixed 'com.test:civersion-tiletest-projectB:null' with tile 'com.test:civersion-tiletest-workspace-tile1:1' as its new parent. 30 | [INFO] Explicitly set version to 'null' from original parent 'com.test:civersion-tiletest-projectBParent:null'. 31 | [INFO] Mixed 'com.test:civersion-tiletest-workspace-tile1:1' with original parent 'com.test:civersion-tiletest-projectBParent:null' as its new top level parent. 32 | [INFO] 33 | [ERROR] Internal error: java.lang.NullPointerException: Cannot invoke method hashCode() on null object -> [Help 1] 34 | org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerException: Cannot invoke method hashCode() on null object 35 | at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:120) 36 | at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972) 37 | at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) 38 | at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) 39 | at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) 40 | at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) 41 | at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) 42 | at java.lang.reflect.Method.invoke (Method.java:498) 43 | at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) 44 | at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) 45 | at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) 46 | at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) 47 | Caused by: java.lang.NullPointerException: Cannot invoke method hashCode() on null object 48 | at org.codehaus.groovy.runtime.NullObject.hashCode (NullObject.java:174) 49 | at org.codehaus.groovy.runtime.NullObject$hashCode.call (Unknown Source) 50 | at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall (CallSiteArray.java:47) 51 | at org.codehaus.groovy.runtime.callsite.NullCallSite.call (NullCallSite.java:34) 52 | at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall (CallSiteArray.java:47) 53 | at java_lang_String$hashCode.call (Unknown Source) 54 | at io.repaint.maven.tiles.NotDefaultModelCache$Key. (NotDefaultModelCache.groovy:54) 55 | at io.repaint.maven.tiles.NotDefaultModelCache.get (NotDefaultModelCache.groovy:29) 56 | at org.apache.maven.model.building.DefaultModelBuilder.getCache (DefaultModelBuilder.java:1363) 57 | at org.apache.maven.model.building.DefaultModelBuilder.readParent (DefaultModelBuilder.java:852) 58 | at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:344) 59 | at org.apache.maven.model.building.DefaultModelBuilder.build (DefaultModelBuilder.java:252) 60 | at org.apache.maven.model.building.ModelBuilder$build.call (Unknown Source) 61 | at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall (CallSiteArray.java:47) 62 | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:125) 63 | at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:139) 64 | at io.repaint.maven.tiles.TilesMavenLifecycleParticipant.thunkModelBuilder (TilesMavenLifecycleParticipant.groovy:518) 65 | at io.repaint.maven.tiles.TilesMavenLifecycleParticipant.orchestrateMerge (TilesMavenLifecycleParticipant.groovy:424) 66 | at io.repaint.maven.tiles.TilesMavenLifecycleParticipant.afterProjectsRead (TilesMavenLifecycleParticipant.groovy:322) 67 | at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:264) 68 | at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) 69 | at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) 70 | at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972) 71 | at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293) 72 | at org.apache.maven.cli.MavenCli.main (MavenCli.java:196) 73 | at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) 74 | at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) 75 | at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) 76 | at java.lang.reflect.Method.invoke (Method.java:498) 77 | at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282) 78 | at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225) 79 | at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406) 80 | at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) 81 | [ERROR] 82 | [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 83 | [ERROR] Re-run Maven using the -X switch to enable full debug logging. 84 | [ERROR] 85 | [ERROR] For more information about the errors and possible solutions, please read the following articles: 86 | [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException 87 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest-workspace-pom/tile-tile1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | com.test 5 | civersion-tiletest-workspace-tile1 6 | 1 7 | 8 | tile 9 | 10 | CI Friendly Build Version Maven Tiles Test - Tile1 11 | 12 | 13 | 14 | 15 | 16 | 17 | io.repaint.maven 18 | tiles-maven-plugin 19 | @project.version@ 20 | true 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest-workspace-pom/tile-tile1/tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | tile1 6 | 7 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest-workspace-pom/verify.bsh: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | 3 | File file = new File( basedir, "build.log" ); 4 | if ( !file.isFile() ) { 5 | throw new FileNotFoundException( "Could not find build log: " + file ); 6 | } 7 | 8 | String content = new Scanner(file).useDelimiter("\\Z").next(); 9 | 10 | if (!content.contains("BUILD SUCCESS")) { 11 | throw new Exception("Error found."); 12 | } 13 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/ciparent/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | civersion-tiletest-ciparent 7 | 0.1.${changelist} 8 | 9 | pom 10 | 11 | 12 | com.test 13 | civersion-tiletest-parent3 14 | 0.1.${changelist} 15 | ../parent3/pom.xml 16 | 17 | 18 | CI Friendly Build Version Maven Tiles Test - CI Parent 19 | 20 | 21 | 0-SNAPSHOT 22 | ${foo.bar.parent3}|${foo.bar.tile2} 23 | 24 | 25 | 26 | 27 | 28 | io.repaint.maven 29 | tiles-maven-plugin 30 | @project.version@ 31 | true 32 | 33 | 34 | com.test:civersion-tiletest-tile2:1 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/dynamic/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | civersion-tiletest-dynamic 7 | ${changelist} 8 | 9 | pom 10 | 11 | CI Friendly Build Version Maven Tiles Test - Dynamic Property 12 | 13 | 14 | 15 | 16 | io.repaint.maven 17 | tiles-maven-plugin 18 | @project.version@ 19 | true 20 | 21 | 22 | com.test:civersion-tiletest-tile3:1 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/dynamic/test.properties: -------------------------------------------------------------------------------- 1 | changelist=0.1-SNAPSHOT 2 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.goals = clean dependency:go-offline help:effective-pom 2 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/noparent/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | civersion-tiletest-noparent 7 | 0.1.${changelist} 8 | 9 | pom 10 | 11 | CI Friendly Build Version Maven Tiles Test - No Parent 12 | 13 | 14 | 0-SNAPSHOT 15 | ${foo.bar.tile2} 16 | 17 | 18 | 19 | 20 | 21 | io.repaint.maven 22 | tiles-maven-plugin 23 | @project.version@ 24 | true 25 | 26 | 27 | com.test:civersion-tiletest-tile2:1 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/parent1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | civersion-tiletest-parent1 7 | 1 8 | 9 | pom 10 | 11 | CI Friendly Build Version Maven Tiles Test - Parent1 12 | 13 | 14 | 0-SNAPSHOT 15 | parent1 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/parent2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | civersion-tiletest-parent2 7 | 1 8 | 9 | pom 10 | 11 | 12 | com.test 13 | civersion-tiletest-parent1 14 | 1 15 | ../parent1/pom.xml 16 | 17 | 18 | CI Friendly Build Version Maven Tiles Test - Parent2 19 | 20 | 21 | 0-SNAPSHOT 22 | ${foo.bar.parent1} 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/parent3/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | civersion-tiletest-parent3 7 | 0.1.${changelist} 8 | 9 | pom 10 | 11 | CI Friendly Build Version Maven Tiles Test - Parent3 12 | 13 | 14 | 0-SNAPSHOT 15 | parent3 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | civersion-tiletest 7 | 0.1.${changelist} 8 | 9 | pom 10 | 11 | 12 | com.test 13 | civersion-tiletest-parent1 14 | 1 15 | parent1/pom.xml 16 | 17 | 18 | CI Friendly Build Version Maven Tiles Test 19 | 20 | 21 | 0-SNAPSHOT 22 | ${foo.bar.parent1}|${foo.bar.tile1} 23 | 24 | 25 | 26 | ciparent 27 | noparent 28 | twoparents 29 | parent1 30 | parent2 31 | parent3 32 | dynamic 33 | tile-tile1 34 | tile-tile2 35 | tile-tile3 36 | 37 | 38 | 39 | 40 | 41 | io.repaint.maven 42 | tiles-maven-plugin 43 | @project.version@ 44 | true 45 | 46 | 47 | com.test:civersion-tiletest-tile1:1 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/tile-tile1/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | civersion-tiletest-tile1 7 | 1 8 | 9 | tile 10 | 11 | CI Friendly Build Version Maven Tiles Test - Tile1 12 | 13 | 14 | 0-SNAPSHOT 15 | 16 | 17 | 18 | 19 | 20 | io.repaint.maven 21 | tiles-maven-plugin 22 | @project.version@ 23 | true 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/tile-tile1/tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | tile1 6 | 7 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/tile-tile2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | civersion-tiletest-tile2 7 | 1 8 | 9 | tile 10 | 11 | CI Friendly Build Version Maven Tiles Test - Tile2 12 | 13 | 14 | 0-SNAPSHOT 15 | 16 | 17 | 18 | 19 | 20 | io.repaint.maven 21 | tiles-maven-plugin 22 | @project.version@ 23 | true 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/tile-tile2/tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | tile2 6 | 7 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/tile-tile3/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | civersion-tiletest-tile3 7 | 1 8 | 9 | tile 10 | 11 | CI Friendly Build Version Maven Tiles Test - Tile3 12 | 13 | 14 | 15 | 16 | io.repaint.maven 17 | tiles-maven-plugin 18 | @project.version@ 19 | true 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/tile-tile3/tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | org.codehaus.mojo 8 | properties-maven-plugin 9 | 1.0.0 10 | 11 | 12 | initialize 13 | 14 | read-project-properties 15 | 16 | 17 | 18 | test.properties 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/twoparents/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | civersion-tiletest-twoparents 7 | 0.1.${changelist} 8 | 9 | pom 10 | 11 | 12 | com.test 13 | civersion-tiletest-parent2 14 | 1 15 | ../parent2/pom.xml 16 | 17 | 18 | CI Friendly Build Version Maven Tiles Test - Two Parents 19 | 20 | 21 | 0-SNAPSHOT 22 | ${foo.bar.parent2}|${foo.bar.tile2} 23 | 24 | 25 | 26 | 27 | 28 | io.repaint.maven 29 | tiles-maven-plugin 30 | @project.version@ 31 | true 32 | 33 | com.test:civersion-tiletest-parent2 34 | 35 | com.test:civersion-tiletest-tile2:1 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/it/civersion-tiletest/verify.bsh: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | 3 | File file = new File( basedir, "build.log" ); 4 | if ( !file.isFile() ) { 5 | throw new FileNotFoundException( "Could not find build log: " + file ); 6 | } 7 | 8 | String content = new Scanner(file).useDelimiter("\\Z").next(); 9 | 10 | // check for pom->tile->parent inclusion 11 | if (!content.contains("[INFO] Mixed 'com.test:civersion-tiletest:0.1.0-SNAPSHOT' with tile 'com.test:civersion-tiletest-tile1:1' as its new parent.")) { 12 | throw new Exception("Tile civersion-tiletest not injected"); 13 | } 14 | if (!content.contains("[INFO] Mixed 'com.test:civersion-tiletest-tile1:1' with original parent 'com.test:civersion-tiletest-parent1:1' via parent1/pom.xml as its new top level parent.")) { 15 | throw new Exception("Tile civersion-tiletest-tile1 not injected"); 16 | } 17 | if (!content.contains("parent1|tile1")) { 18 | throw new Exception("Tile parent1|tile1 not injected"); 19 | } 20 | 21 | // check for pom->tile inclusion 22 | if (!content.contains("[INFO] Mixed 'com.test:civersion-tiletest-noparent:0.1.0-SNAPSHOT' with tile 'com.test:civersion-tiletest-tile2:1' as its new parent.")) { 23 | throw new Exception("Tile civersion-tiletest-noparent not injected"); 24 | } 25 | if (!content.contains("tile2")) { 26 | throw new Exception("Tile tile2 not injected"); 27 | } 28 | if (!content.contains("Injecting 1 tiles as intermediary parent artifacts for com.test:civersion-tiletest-dynamic")) { 29 | throw new Exception("Tile civersion-tiletest-dynamic not injected"); 30 | } 31 | 32 | // check for pom->parent->tile inclusion 33 | if (!content.contains("[INFO] Mixed 'com.test:civersion-tiletest-parent2:1' with tile 'com.test:civersion-tiletest-tile2:1' as its new parent.")) { 34 | throw new Exception("Tile civersion-tiletest-parent2 not injected"); 35 | } 36 | 37 | if (!content.contains("[INFO] Mixed 'com.test:civersion-tiletest-tile2:1' with original parent 'com.test:civersion-tiletest-parent1:1' via ../parent1/pom.xml as its new top level parent.")) { 38 | throw new Exception("Tile civersion-tiletest-tile2 not injected"); 39 | } 40 | if (!content.contains("parent1|tile2")) { 41 | throw new Exception("Tile parent1|tile2 not injected"); 42 | } 43 | 44 | // check for using a CI version in a parent 45 | 46 | if (!content.contains("[INFO] Mixed 'com.test:civersion-tiletest-ciparent:0.1.0-SNAPSHOT' with tile 'com.test:civersion-tiletest-tile2:1' as its new parent.")) { 47 | throw new Exception("Tile civersion-tiletest-ciparent not injected"); 48 | } 49 | 50 | if (!content.contains("[INFO] Mixed 'com.test:civersion-tiletest-tile2:1' with original parent 'com.test:civersion-tiletest-parent3:0.1.0-SNAPSHOT' via ../parent3/pom.xml as its new top level parent.")) { 51 | throw new Exception("Tile civersion-tiletest-tile2 not injected"); 52 | } 53 | if (!content.contains("parent3|tile2")) { 54 | throw new Exception("Tile parent3 not injected"); 55 | } 56 | -------------------------------------------------------------------------------- /src/it/distributionManagemetTile/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.goals = clean dependency:go-offline help:effective-pom deploy 2 | -------------------------------------------------------------------------------- /src/it/distributionManagemetTile/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | io.repaint.maven 7 | distribution-management-test 8 | 1.0-SNAPSHOT 9 | pom 10 | 11 | Maven Tiles Distribution Management Test 12 | 13 | 14 | tileA 15 | projectA 16 | 17 | 18 | 19 | 20 | 21 | org.apache.maven.plugins 22 | maven-deploy-plugin 23 | 3.1.1 24 | 25 | true 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/it/distributionManagemetTile/projectA/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | io.repaint.maven 6 | projectA 7 | 1 8 | pom 9 | 10 | Maven Distribution Management Test 11 | 12 | 13 | 14 | 15 | io.repaint.maven 16 | tiles-maven-plugin 17 | @project.version@ 18 | true 19 | 20 | 21 | io.repaint.maven:tileA:1 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/it/distributionManagemetTile/tileA/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | io.repaint.maven 6 | tileA 7 | 1 8 | tile 9 | 10 | Maven Tiles Distribution Management Test - TileA 11 | 12 | 13 | 14 | repaint-staging 15 | io.repaint Staging Repository 16 | file:///tmp/maven-tiles/staging/ 17 | 18 | 19 | repaint-snapshots 20 | io.repaint Snapshot Repository 21 | file:///tmp/maven-tiles/snapshot/ 22 | 23 | 24 | 25 | 26 | 27 | 28 | io.repaint.maven 29 | tiles-maven-plugin 30 | @project.version@ 31 | true 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/it/distributionManagemetTile/tileA/tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | repaint-tile-staging 8 | io.repaint Staging Repository 9 | file:///tmp/maven-tiles/staging/ 10 | 11 | 12 | repaint-tile-snapshots 13 | io.repaint Snapshot Repository 14 | file:///tmp/maven-tiles/snapshot/ 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/it/distributionManagemetTile/verify.bsh: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | 4 | File file = new File(basedir, "build.log" ); 5 | if ( !file.isFile() ) { 6 | throw new FileNotFoundException( "Could not find build log: " + file ); 7 | } 8 | 9 | String content = new Scanner(file).useDelimiter("\\Z").next(); 10 | 11 | // tileX should win 12 | if (!content.contains("repaint-tile-staging")) 13 | throw new Exception("repaint-tile-staging expected to be in effective pom"); 14 | if (!content.contains("io.repaint Staging Repository")) 15 | throw new Exception("io.repaint Staging Repository expected to be in effective pom"); 16 | -------------------------------------------------------------------------------- /src/it/order-tests/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | io.repaint.maven 6 | tile-order-test 7 | 1.0-SNAPSHOT 8 | pom 9 | 10 | Maven Tiles Order Test 11 | 12 | 13 | tileA 14 | tileB 15 | tileC 16 | tileD 17 | projectA 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/it/order-tests/projectA/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | io.repaint.maven 6 | projectA 7 | 1 8 | pom 9 | 10 | Maven Tiles Order Test 11 | 12 | 13 | pom 14 | pom 15 | pom 16 | pom 17 | pom 18 | pom 19 | pom 20 | 21 | 22 | 23 | 24 | 25 | io.repaint.maven 26 | tiles-maven-plugin 27 | @project.version@ 28 | true 29 | 30 | 31 | io.repaint.maven:tileB:1 32 | io.repaint.maven:tileC:1 33 | io.repaint.maven:tileD:1 34 | 35 | 36 | 37 | 38 | com.soebes.maven.plugins 39 | echo-maven-plugin 40 | 0.4.0 41 | 42 | 43 | properties 44 | validate 45 | echo 46 | 47 | 48 | propertyA: ${propertyA} 49 | propertyB: ${propertyB} 50 | propertyC: ${propertyC} 51 | propertyAB: ${propertyAB} 52 | propertyAC: ${propertyAC} 53 | propertyBC: ${propertyBC} 54 | propertyABC: ${propertyABC} 55 | proj propertyA: ${propertyAP} 56 | proj propertyB: ${propertyBP} 57 | proj propertyC: ${propertyCP} 58 | proj propertyAB: ${propertyABP} 59 | proj propertyAC: ${propertyACP} 60 | proj propertyBC: ${propertyBCP} 61 | proj propertyABC: ${propertyABCP} 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/it/order-tests/tileA/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | io.repaint.maven 6 | tileA 7 | 1 8 | tile 9 | 10 | Maven Tiles Order Test - TileA 11 | 12 | 13 | 14 | 15 | io.repaint.maven 16 | tiles-maven-plugin 17 | @project.version@ 18 | true 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/it/order-tests/tileA/tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | com.soebes.maven.plugins 8 | echo-maven-plugin 9 | 0.4.0 10 | 11 | 12 | E1 13 | initialize 14 | echo 15 | 16 | 17 | Tile A (E1) 18 | 19 | 20 | 21 | 22 | E2 23 | initialize 24 | echo 25 | 26 | true 27 | 28 | Tile A (E2) 29 | 30 | 31 | 32 | 33 | tileA 34 | initialize 35 | echo 36 | 37 | 38 | Tile A 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | default-props 50 | 51 | 52 | !prop-does-not-exist 53 | 54 | 55 | 56 | tileA 57 | tileA 58 | tileA 59 | tileA 60 | tileA 61 | tileA 62 | tileA 63 | tileA 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/it/order-tests/tileB/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | io.repaint.maven 6 | tileB 7 | 1 8 | tile 9 | 10 | Maven Tiles Order Test - TileB 11 | 12 | 13 | 14 | 15 | io.repaint.maven 16 | tiles-maven-plugin 17 | @project.version@ 18 | true 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/it/order-tests/tileB/tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | com.soebes.maven.plugins 8 | echo-maven-plugin 9 | 0.4.0 10 | 11 | 12 | E1 13 | initialize 14 | echo 15 | 16 | 17 | Tile B (E1) 18 | 19 | 20 | 21 | 22 | E2 23 | initialize 24 | echo 25 | 26 | true 27 | 28 | Tile B (E2) 29 | 30 | 31 | 32 | 33 | tileB 34 | initialize 35 | echo 36 | 37 | 38 | Tile B 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | default-props 50 | 51 | 52 | !prop-does-not-exist 53 | 54 | 55 | 56 | tileB 57 | tileB 58 | tileB 59 | tileB 60 | tileB 61 | tileB 62 | tileB 63 | tileB 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/it/order-tests/tileC/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | io.repaint.maven 6 | tileC 7 | 1 8 | tile 9 | 10 | Maven Tiles Order Test - TileC 11 | 12 | 13 | 14 | 15 | io.repaint.maven 16 | tiles-maven-plugin 17 | @project.version@ 18 | true 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/it/order-tests/tileC/tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | com.soebes.maven.plugins 8 | echo-maven-plugin 9 | 0.4.0 10 | 11 | 12 | E1 13 | initialize 14 | echo 15 | 16 | 17 | Tile C (E1) 18 | 19 | 20 | 21 | 22 | E2 23 | initialize 24 | echo 25 | 26 | true 27 | 28 | Tile C (E2) 29 | 30 | 31 | 32 | 33 | tileB 34 | initialize 35 | echo 36 | 37 | 38 | Tile C 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | default-props 50 | 51 | 52 | !prop-does-not-exist 53 | 54 | 55 | 56 | tileC 57 | tileC 58 | tileC 59 | tileC 60 | tileC 61 | tileC 62 | tileC 63 | tileC 64 | 65 | 66 | 67 | 68 | 69 | io.repaint.maven:tileA:1 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/it/order-tests/tileD/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | io.repaint.maven 6 | tileD 7 | 1 8 | tile 9 | 10 | Maven Tiles Order Test - TileD 11 | 12 | 13 | 14 | 15 | io.repaint.maven 16 | tiles-maven-plugin 17 | @project.version@ 18 | true 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/it/order-tests/tileD/tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | com.soebes.maven.plugins 8 | echo-maven-plugin 9 | 0.4.0 10 | 11 | 12 | E1 13 | initialize 14 | echo 15 | 16 | 17 | Tile D (E1) 18 | 19 | 20 | 21 | 22 | E2 23 | initialize 24 | echo 25 | 26 | true 27 | 28 | Tile D (E2) 29 | 30 | 31 | 32 | 33 | tileB 34 | initialize 35 | echo 36 | 37 | 38 | Tile D 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/it/order-tests/verify.bsh: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | import java.util.*; 3 | 4 | File file = new File( basedir, "build.log" ); 5 | if ( !file.isFile() ) { 6 | throw new FileNotFoundException( "Could not find build log: " + file ); 7 | } 8 | 9 | String content = new Scanner(file).useDelimiter("\\Z").next(); 10 | 11 | // tileX should win 12 | if (!content.contains("[INFO] propertyA: tileA")) 13 | throw new Exception("tileA is expected to win at defining propertyA"); 14 | if (!content.contains("[INFO] propertyB: tileB")) 15 | throw new Exception("tileB is expected to win at defining propertyB"); 16 | if (!content.contains("[INFO] propertyC: tileC")) 17 | throw new Exception("tileC is expected to win at defining propertyC"); 18 | if (!content.contains("[INFO] propertyAB: tileB")) 19 | throw new Exception("tileB is expected to win at defining propertyAB"); 20 | if (!content.contains("[INFO] propertyAC: tileC")) 21 | throw new Exception("tileC is expected to win at defining propertyAC"); 22 | if (!content.contains("[INFO] propertyBC: tileB")) 23 | throw new Exception("tileB is expected to win at defining propertyBC"); 24 | if (!content.contains("[INFO] propertyABC: tileB")) 25 | throw new Exception("tileB is expected to win at defining propertyABC"); 26 | 27 | // pom should win 28 | if (!content.contains("[INFO] proj propertyA: pom")) 29 | throw new Exception("The pom is expected to win at defining propertyAP"); 30 | if (!content.contains("[INFO] proj propertyB: pom")) 31 | throw new Exception("The pom is expected to win at defining propertyBP"); 32 | if (!content.contains("[INFO] proj propertyC: pom")) 33 | throw new Exception("The pom is expected to win at defining propertyCP"); 34 | if (!content.contains("[INFO] proj propertyAB: pom")) 35 | throw new Exception("The pom is expected to win at defining propertyABP"); 36 | if (!content.contains("[INFO] proj propertyAC: pom")) 37 | throw new Exception("The pom is expected to win at defining propertyACP"); 38 | if (!content.contains("[INFO] proj propertyBC: pom")) 39 | throw new Exception("The pom is expected to win at defining propertyBCP"); 40 | if (!content.contains("[INFO] proj propertyABC: pom")) 41 | throw new Exception("The pom is expected to win at defining propertyABCP"); 42 | 43 | // plugin executions that should be shadowed 44 | if (content.contains("[INFO] Tile A (E2)")) 45 | throw new Exception("The tileA E2 execution should have been shadowed"); 46 | if (content.contains("[INFO] Tile C (E2)")) 47 | throw new Exception("The tileC E2 execution should have been shadowed"); 48 | if (content.contains("[INFO] Tile D (E2)")) 49 | throw new Exception("The tileD E2 execution should have been shadowed"); 50 | 51 | List indexes = new LinkedList(); 52 | indexes.add(content.indexOf("[INFO] Tile D (E1)\n")); 53 | indexes.add(content.indexOf("[INFO] Tile B (E2)\n")); 54 | indexes.add(content.indexOf("[INFO] Tile D\n")); 55 | indexes.add(content.indexOf("[INFO] Tile A (E1)\n")); 56 | indexes.add(content.indexOf("[INFO] Tile A\n")); 57 | indexes.add(content.indexOf("[INFO] Tile C (E1)\n")); 58 | indexes.add(content.indexOf("[INFO] Tile C\n")); 59 | indexes.add(content.indexOf("[INFO] Tile B (E1)\n")); 60 | indexes.add(content.indexOf("[INFO] Tile B\n")); 61 | 62 | Integer lastindex = -1; 63 | for (Integer index : indexes) { 64 | if (lastindex > index) 65 | throw new Exception("The tile execution order is not in the proper order, starting with the " + index + " output"); 66 | lastindex = index; 67 | } -------------------------------------------------------------------------------- /src/it/remoteparent-test/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.goals = clean dependency:go-offline help:effective-pom 2 | -------------------------------------------------------------------------------- /src/it/remoteparent-test/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | remoteparent-agg 6 | ${revision}.${changelist} 7 | 8 | pom 9 | 10 | 11 | com.test 12 | remoteparent-parent 13 | ${revision}.${changelist} 14 | ./remoteparent-parent/pom.xml 15 | 16 | 17 | Parent with Remote Tile Test - Aggregator 18 | 19 | 20 | remoteparent-parent 21 | remoteparent-child 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/it/remoteparent-test/remoteparent-child/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | remoteparent-child 6 | ${revision}.${changelist} 7 | pom 8 | 9 | 10 | com.test 11 | remoteparent-parent 12 | ${revision}.${changelist} 13 | ../remoteparent-parent/pom.xml 14 | 15 | 16 | Parent with Remote Tile Test - Child 17 | 18 | 19 | 20 | 21 | io.repaint.maven 22 | tiles-maven-plugin 23 | @project.version@ 24 | true 25 | 26 | 27 | net.stickycode.tile:sticky-tile-library:1.2 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/it/remoteparent-test/remoteparent-parent/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | remoteparent-parent 7 | ${revision}.${changelist} 8 | pom 9 | 10 | Parent with Remote Tile Test - Parent 11 | 12 | 13 | 1.0 14 | 0-SNAPSHOT 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/it/remoteparent-test/verify.bsh: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | 3 | File file = new File( basedir, "build.log" ); 4 | if ( !file.isFile() ) { 5 | throw new FileNotFoundException( "Could not find build log: " + file ); 6 | } 7 | 8 | String content = new Scanner(file).useDelimiter("\\Z").next(); 9 | 10 | // check for pom->tile->parent inclusion 11 | if (!content.contains("[INFO] Mixed 'null:remoteparent-child:1.0.0-SNAPSHOT' with tile 'net.stickycode.tile:sticky-tile-library:1.2' as its new parent.")) { 12 | throw new Exception("Tile not injected"); 13 | } 14 | if (!content.contains("[INFO] Explicitly set groupId to 'com.test' from original parent 'com.test:remoteparent-parent:1.0.0-SNAPSHOT'.")) { 15 | throw new Exception("Tile not injected"); 16 | } 17 | if (!content.contains("[INFO] Mixed 'net.stickycode.tile:sticky-tile-library:1.2' with original parent 'com.test:remoteparent-parent:1.0.0-SNAPSHOT' via ../remoteparent-parent/pom.xml as its new top level parent.")) { 18 | throw new Exception("Tile not injected"); 19 | } 20 | -------------------------------------------------------------------------------- /src/it/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | it-repo 5 | 6 | true 7 | 8 | 9 | 10 | local.central 11 | @localRepositoryUrl@ 12 | 13 | true 14 | 15 | 16 | true 17 | 18 | 19 | 20 | 21 | 22 | local.central 23 | @localRepositoryUrl@ 24 | 25 | true 26 | 27 | 28 | true 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/it/sitereporting-tiletest/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.goals = clean dependency:go-offline site:site 2 | -------------------------------------------------------------------------------- /src/it/sitereporting-tiletest/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | reporting-tiletest 7 | 0.1.0 8 | 9 | pom 10 | 11 | Reporting Maven Tiles Test 12 | 13 | 14 | tile-tile 15 | 16 | 17 | 18 | UTF-8 19 | UTF-8 20 | 21 | 22 | https://github.com/repaint-io/maven-tiles 23 | 24 | 25 | https://github.com/repaint-io/maven-tiles/issues 26 | GitHub 27 | 28 | 29 | 30 | 31 | 32 | io.repaint.maven 33 | tiles-maven-plugin 34 | @project.version@ 35 | true 36 | 37 | 38 | 39 | com.test:reporting-tiletest-tile:0.1.0 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/it/sitereporting-tiletest/tile-tile/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | com.test 6 | reporting-tiletest-tile 7 | 0.1.0 8 | 9 | tile 10 | 11 | Reporting Maven Tiles Test - Tile 12 | 13 | 14 | 15 | 16 | org.apache.maven.plugins 17 | maven-site-plugin 18 | 3.7.1 19 | 20 | true 21 | 22 | 23 | 24 | org.apache.maven.plugins 25 | maven-project-info-reports-plugin 26 | 2.9 27 | 28 | false 29 | 30 | 31 | 32 | io.repaint.maven 33 | tiles-maven-plugin 34 | @project.version@ 35 | true 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/it/sitereporting-tiletest/tile-tile/tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | org.apache.maven.plugins 8 | maven-site-plugin 9 | 3.7.1 10 | 11 | true 12 | 13 | 14 | 15 | org.apache.maven.plugins 16 | maven-project-info-reports-plugin 17 | 2.9 18 | 19 | false 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | org.apache.maven.plugins 29 | maven-changes-plugin 30 | 2.12.1 31 | 32 | false 33 | false 34 | true 35 | 36 | 37 | 38 | 39 | github-report 40 | 41 | 42 | 43 | 44 | 45 | org.apache.maven.plugins 46 | maven-project-info-reports-plugin 47 | 2.9 48 | 49 | false 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/it/sitereporting-tiletest/verify.bsh: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | 3 | File file = new File( basedir, "build.log" ); 4 | if ( !file.isFile() ) { 5 | throw new FileNotFoundException( "Could not find build log: " + file ); 6 | } 7 | 8 | String content = new Scanner(file).useDelimiter("\\Z").next(); 9 | 10 | if (!content.contains("[INFO] configuring report plugin org.apache.maven.plugins:maven-changes-plugin")) { 11 | throw new Exception("Tile not injected fully"); 12 | } 13 | 14 | if (!content.contains("[INFO] configuring report plugin org.apache.maven.plugins:maven-project-info-reports-plugin")) { 15 | throw new Exception("Tile not injected fully"); 16 | } 17 | 18 | File file = new File( basedir, "target/site/github-report.html" ); 19 | if ( !file.isFile() ) { 20 | throw new FileNotFoundException( "Could not find github-report: " + file ); 21 | } 22 | -------------------------------------------------------------------------------- /src/it/spring-boot/invoker.properties: -------------------------------------------------------------------------------- 1 | invoker.goals = clean dependency:go-offline spring-boot:run 2 | -------------------------------------------------------------------------------- /src/it/spring-boot/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.springframework.boot 6 | spring-boot-starter-parent 7 | 2.7.0 8 | 9 | mixin-testing 10 | mixin.testing 11 | Spring Boot Simple Sample 12 | 1.0-SNAPSHOT 13 | 14 | 1.8 15 | 1.8 16 | 17 | 18 | 19 | org.springframework.boot 20 | spring-boot-starter 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter-test 25 | test 26 | 27 | 28 | 29 | 30 | 31 | org.springframework.boot 32 | spring-boot-maven-plugin 33 | 34 | io.repaint.Main 35 | 36 | 37 | 38 | io.repaint.maven 39 | tiles-maven-plugin 40 | @project.version@ 41 | true 42 | 43 | false 44 | 45 | net.kemitix.tiles:pmd:3.2.0 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/it/spring-boot/src/main/java/io/repaint/Main.java: -------------------------------------------------------------------------------- 1 | package io.repaint; 2 | 3 | public class Main { 4 | public static void main(String[] args) { 5 | System.out.println("Spring boot lives!"); 6 | } 7 | } -------------------------------------------------------------------------------- /src/it/spring-boot/verify.bsh: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | 3 | File file = new File( basedir, "build.log" ); 4 | if ( !file.isFile() ) { 5 | throw new FileNotFoundException( "Could not find build log: " + file ); 6 | } 7 | 8 | String content = new Scanner(file).useDelimiter("\\Z").next(); 9 | 10 | if (!content.contains("[INFO] Mixed 'net.kemitix.tiles:pmd:3.2.0' with original parent")) { 11 | throw new Exception("Tile not injected"); 12 | } 13 | 14 | if (!content.contains("Spring boot lives!")) { 15 | throw new Exception("Compiled example output not found."); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/groovy/io/repaint/maven/tiles/AbstractTileMojo.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import groovy.transform.CompileStatic 4 | import org.apache.maven.execution.MavenSession 5 | import org.apache.maven.plugin.AbstractMojo 6 | import org.apache.maven.plugins.annotations.Component 7 | import org.apache.maven.plugins.annotations.Parameter 8 | import org.apache.maven.project.MavenProject 9 | import org.apache.maven.shared.filtering.MavenFileFilter 10 | import org.apache.maven.shared.filtering.MavenResourcesFiltering 11 | import org.slf4j.Logger 12 | import org.slf4j.LoggerFactory 13 | 14 | /** 15 | * 16 | * @author: Richard Vowles - https://plus.google.com/+RichardVowles 17 | * @author: Mark Derricutt - https://plus.google.com/+MarkDerricutt 18 | */ 19 | @CompileStatic 20 | abstract class AbstractTileMojo extends AbstractMojo { 21 | 22 | @Parameter(property = "project", readonly = true, required = true) 23 | MavenProject project 24 | 25 | @Parameter(property = "tiles", readonly = false, required = false) 26 | List tiles 27 | 28 | @Parameter(property = "applyBefore", readonly = false, required = false) 29 | String applyBefore; 30 | 31 | @Parameter(property = "buildSmells", readonly = false, required = false) 32 | String buildSmells 33 | 34 | @Parameter(property = "filtering", readonly = false, required = false, defaultValue = "false") 35 | boolean filtering 36 | 37 | @Parameter(required = true, defaultValue = '${project.build.directory}/generated-sources') 38 | File generatedSourcesDirectory 39 | 40 | @Parameter( defaultValue = "\${session}", readonly = true ) 41 | MavenSession mavenSession 42 | 43 | @Component 44 | MavenFileFilter mavenFileFilter 45 | 46 | @Component 47 | MavenResourcesFiltering mavenResourcesFiltering 48 | 49 | Logger logger = LoggerFactory.getLogger(getClass()) 50 | 51 | File getTile() { 52 | return FilteringHelper.getTile(project, filtering, generatedSourcesDirectory, mavenSession, mavenFileFilter, mavenResourcesFiltering) 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/groovy/io/repaint/maven/tiles/AttachTileMojo.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import groovy.transform.CompileStatic 4 | import org.apache.maven.plugin.MojoExecutionException 5 | import org.apache.maven.plugin.MojoFailureException 6 | import org.apache.maven.plugins.annotations.Component 7 | import org.apache.maven.plugins.annotations.LifecyclePhase 8 | import org.apache.maven.plugins.annotations.Mojo 9 | import org.apache.maven.plugins.annotations.ResolutionScope 10 | import org.apache.maven.project.MavenProjectHelper 11 | 12 | /** 13 | * We are attaching the tile.pom file, and we don't care what the dependency resolution is. 14 | * 15 | * @author: Richard Vowles - https://plus.google.com/+RichardVowles 16 | * @author: Mark Derricutt - https://plus.google.com/+MarkDerricutt 17 | */ 18 | @CompileStatic 19 | @Mojo(name = "attach-tile", requiresProject = true, requiresDependencyResolution = ResolutionScope.NONE, defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true) 20 | class AttachTileMojo extends AbstractTileMojo { 21 | 22 | @Component 23 | MavenProjectHelper projectHelper 24 | 25 | @Override 26 | void execute() throws MojoExecutionException, MojoFailureException { 27 | 28 | File tile = getTile() 29 | 30 | if (new TileValidator().loadModel(logger, tile, buildSmells)) { 31 | if ("tile".equals(project.getPackaging())) { 32 | project.getArtifact().setFile(tile); 33 | } else { 34 | projectHelper.attachArtifact(project, "tile", tile) 35 | } 36 | 37 | logger.info("Tile: attaching tile ${tile.path}") 38 | } else { 39 | throw new MojoFailureException("Unable to validate tile ${tile.path}!") 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/groovy/io/repaint/maven/tiles/Constants.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import groovy.transform.CompileStatic; 4 | 5 | @CompileStatic 6 | final class Constants { 7 | 8 | public static final String TILEPLUGIN_GROUP = "io.repaint.maven" 9 | public static final String TILEPLUGIN_ARTIFACT = "tiles-maven-plugin" 10 | public static final String TILE_POM = "tile.xml" 11 | 12 | private Constants() {} 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/groovy/io/repaint/maven/tiles/FilteringHelper.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import groovy.transform.CompileStatic 4 | import groovy.transform.TypeCheckingMode 5 | import org.apache.maven.execution.MavenSession 6 | import org.apache.maven.model.Plugin 7 | import org.apache.maven.model.Resource 8 | import org.apache.maven.project.MavenProject 9 | import org.apache.maven.shared.filtering.MavenFileFilter 10 | import org.apache.maven.shared.filtering.MavenFileFilterRequest 11 | import org.apache.maven.shared.filtering.MavenResourcesExecution 12 | import org.apache.maven.shared.filtering.MavenResourcesFiltering 13 | 14 | import static io.repaint.maven.tiles.Constants.TILEPLUGIN_ARTIFACT 15 | import static io.repaint.maven.tiles.Constants.TILEPLUGIN_GROUP 16 | import static io.repaint.maven.tiles.Constants.TILE_POM 17 | 18 | @CompileStatic 19 | class FilteringHelper { 20 | 21 | @CompileStatic(TypeCheckingMode.SKIP) 22 | static File getTile(final MavenProject project, 23 | final MavenSession mavenSession, 24 | final MavenFileFilter mavenFileFilter, 25 | final MavenResourcesFiltering mavenResourcesFiltering) { 26 | // determine whether filtering is enabled 27 | def configuration = project.build.plugins 28 | ?.find({ Plugin plugin -> plugin.groupId == TILEPLUGIN_GROUP && plugin.artifactId == TILEPLUGIN_ARTIFACT}) 29 | ?.configuration 30 | 31 | final boolean filtering = configuration?.getChild("filtering")?.getValue() == "true" 32 | 33 | if (filtering) { 34 | String generatedSourcesDirectoryStr = configuration?.getChild("generatedSourcesDirectory")?.getValue() 35 | File generatedSourcesDirectory = generatedSourcesDirectoryStr 36 | ? new File(generatedSourcesDirectoryStr) : new File(project.build.directory, "generated-sources") 37 | return getTile(project, true, generatedSourcesDirectory, mavenSession, mavenFileFilter, mavenResourcesFiltering) 38 | } else { 39 | return getTile(project, false, null, mavenSession, null, null) 40 | } 41 | } 42 | 43 | static File getTile(final MavenProject project, 44 | final boolean filtering, 45 | final File generatedSourcesDirectory, 46 | final MavenSession mavenSession, 47 | final MavenFileFilter mavenFileFilter, 48 | final MavenResourcesFiltering mavenResourcesFiltering) { 49 | File baseTile = new File(project.basedir, TILE_POM) 50 | if (filtering) { 51 | File processedTileDirectory = new File(generatedSourcesDirectory, "tiles") 52 | processedTileDirectory.mkdirs() 53 | File processedTile = new File(processedTileDirectory, TILE_POM) 54 | 55 | Resource tileResource = new Resource() 56 | tileResource.setDirectory(project.basedir.absolutePath) 57 | tileResource.includes.add(TILE_POM) 58 | tileResource.setFiltering(true) 59 | 60 | MavenFileFilterRequest req = new MavenFileFilterRequest(baseTile, 61 | processedTile, 62 | true, 63 | project, 64 | [], 65 | true, 66 | "UTF-8", 67 | mavenSession, 68 | new Properties()) 69 | req.setDelimiters(["@"] as LinkedHashSet) 70 | 71 | MavenResourcesExecution execution = new MavenResourcesExecution( 72 | [tileResource], processedTileDirectory, "UTF-8", 73 | mavenFileFilter.getDefaultFilterWrappers(req), 74 | project.basedir, mavenResourcesFiltering.defaultNonFilteredFileExtensions) 75 | 76 | mavenResourcesFiltering.filterResources(execution) 77 | 78 | return new File(processedTileDirectory, TILE_POM) 79 | } else { 80 | return baseTile 81 | } 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/main/groovy/io/repaint/maven/tiles/GavUtil.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import groovy.transform.CompileStatic 4 | import org.apache.maven.artifact.Artifact 5 | import org.apache.maven.model.Model 6 | import org.apache.maven.model.Parent 7 | 8 | @CompileStatic 9 | class GavUtil { 10 | 11 | public static String artifactName(Artifact artifact) { 12 | return String.format("%s:%s", artifact.groupId, artifact.artifactId) 13 | } 14 | 15 | public static String artifactGav(Artifact artifact) { 16 | return String.format("%s:%s:%s", artifact.groupId, artifact.artifactId, artifact.versionRange ?: artifact.version) 17 | } 18 | 19 | public static String modelGav(Model model) { 20 | return String.format("%s:%s:%s", model.groupId, model.artifactId, model.version) 21 | } 22 | 23 | public static String modelGa(Model model) { 24 | return String.format("%s:%s", model.groupId, model.artifactId) 25 | } 26 | 27 | public static String modelRealGa(Model model) { 28 | return String.format("%s:%s", getRealGroupId(model), model.artifactId) 29 | } 30 | 31 | public static String parentGav(Parent model) { 32 | if (!model) { 33 | return "(no parent)" 34 | } else { 35 | return String.format("%s:%s:%s", model.groupId, model.artifactId, model.version) 36 | } 37 | } 38 | 39 | public static String getRealGroupId(Model model) { 40 | return model.groupId ?: model.parent?.groupId 41 | } 42 | 43 | public static String getRealVersion(Model model) { 44 | return model.version ?: model.parent?.version 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/groovy/io/repaint/maven/tiles/NotDefaultModelCache.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import groovy.transform.CompileStatic 4 | import groovy.transform.TypeCheckingMode 5 | import org.apache.maven.execution.MavenSession 6 | import org.apache.maven.model.building.ModelCache 7 | import org.eclipse.aether.RepositoryCache 8 | import org.eclipse.aether.RepositorySystemSession 9 | 10 | /** 11 | * Because the Default one is package private *sigh* 12 | * 13 | * We have the org.aether / org.sonatype issue 14 | * 15 | * @author: Richard Vowles - https://plus.google.com/+RichardVowles 16 | */ 17 | @CompileStatic 18 | class NotDefaultModelCache implements ModelCache { 19 | 20 | RepositorySystemSession session 21 | RepositoryCache cache 22 | 23 | NotDefaultModelCache(MavenSession mavenSession) { 24 | this.session = mavenSession.repositorySession 25 | this.cache = mavenSession.repositorySession.cache 26 | } 27 | 28 | Object get( String groupId, String artifactId, String version, String tag) { 29 | return cache.get(session, new Key( groupId, artifactId, version, tag)) 30 | } 31 | 32 | void put(String groupId, String artifactId, String version, String tag, Object data) { 33 | cache.put(session, new Key(groupId, artifactId, version, tag), data) 34 | } 35 | 36 | @CompileStatic(TypeCheckingMode.SKIP) 37 | static class Key { 38 | 39 | private final String groupId 40 | private final String artifactId 41 | private final String version 42 | private final String tag 43 | private final int hash 44 | 45 | Key(String groupId, String artifactId, String version, String tag) { 46 | this.groupId = groupId 47 | this.artifactId = artifactId 48 | this.version = version 49 | this.tag = tag 50 | 51 | int h = 17 52 | h = h * 31 + this.groupId.hashCode() 53 | h = h * 31 + this.artifactId.hashCode() 54 | h = h * 31 + this.version.hashCode() 55 | h = h * 31 + this.tag.hashCode() 56 | hash = h 57 | } 58 | 59 | @Override 60 | boolean equals(Object obj) { 61 | if (this.is(obj)) { 62 | return true 63 | } 64 | if (null == obj || getClass() != obj.getClass()) { 65 | return false 66 | } 67 | 68 | return artifactId == obj.artifactId && groupId == obj.groupId && 69 | version == obj.version && tag == obj.tag 70 | } 71 | 72 | @Override 73 | int hashCode() { 74 | return hash 75 | } 76 | 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/groovy/io/repaint/maven/tiles/TileArtifactHandlerProvider.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import org.apache.maven.artifact.handler.ArtifactHandler 4 | import org.apache.maven.artifact.handler.DefaultArtifactHandler 5 | 6 | import javax.inject.Inject 7 | import javax.inject.Named 8 | import javax.inject.Provider 9 | import javax.inject.Singleton 10 | 11 | @Singleton 12 | @Named("tile") 13 | final class TileArtifactHandlerProvider 14 | implements Provider 15 | { 16 | private final DefaultArtifactHandler artifactHandler; 17 | 18 | @Inject 19 | TileArtifactHandlerProvider() 20 | { 21 | this.artifactHandler = new DefaultArtifactHandler("tile") 22 | this.artifactHandler.extension = "xml" 23 | this.artifactHandler.packaging = "tile" // Groovy magic again 24 | this.artifactHandler.language = "xml" 25 | this.artifactHandler.addedToClasspath = false 26 | } 27 | 28 | @Override 29 | ArtifactHandler get() 30 | { 31 | return artifactHandler; 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/groovy/io/repaint/maven/tiles/TileLifecycleMappingProvider.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping 4 | import org.apache.maven.lifecycle.mapping.Lifecycle 5 | import org.apache.maven.lifecycle.mapping.LifecycleMapping 6 | import org.apache.maven.lifecycle.mapping.LifecyclePhase 7 | 8 | import javax.inject.Inject 9 | import javax.inject.Named 10 | import javax.inject.Provider 11 | import javax.inject.Singleton 12 | 13 | @Singleton 14 | @Named("tile") 15 | final class TileLifecycleMappingProvider 16 | implements Provider 17 | { 18 | private final LifecycleMapping lifecycleMapping; 19 | 20 | @Inject 21 | TileLifecycleMappingProvider() 22 | { 23 | Lifecycle lifecycle = new Lifecycle( 24 | id: "default", 25 | lifecyclePhases: [ 26 | "package" : new LifecyclePhase("io.repaint.maven:tiles-maven-plugin:attach-tile"), 27 | "install" : new LifecyclePhase( "org.apache.maven.plugins:maven-install-plugin:install"), 28 | "deploy" : new LifecyclePhase( "org.apache.maven.plugins:maven-deploy-plugin:deploy") 29 | ] 30 | ) 31 | lifecycleMapping = new DefaultLifecycleMapping() 32 | lifecycleMapping.lifecycles = Collections.singletonList( lifecycle ) // this hack is sadly must, or reimplement LifecycleMapping class 33 | } 34 | 35 | @Override 36 | LifecycleMapping get() 37 | { 38 | return lifecycleMapping 39 | } 40 | } -------------------------------------------------------------------------------- /src/main/groovy/io/repaint/maven/tiles/TileModel.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import groovy.transform.CompileStatic 4 | import groovy.transform.TypeCheckingMode 5 | import groovy.xml.XmlUtil 6 | import groovy.xml.XmlSlurper 7 | import org.apache.maven.artifact.Artifact 8 | import org.apache.maven.model.Model 9 | import org.apache.maven.model.Plugin 10 | import org.apache.maven.model.io.xpp3.MavenXpp3Reader 11 | 12 | /** 13 | * This will parse a tile.xml file with the intent of removing extra syntax, holding onto it and then 14 | * pushing the rest into a standard model. We could have used a Delegate or a Mixin here potentially, but 15 | * its probably clearer this way. 16 | * 17 | * @author: Richard Vowles - https://plus.google.com/+RichardVowles 18 | */ 19 | @CompileStatic 20 | class TileModel { 21 | Model model 22 | List tiles = [] 23 | File tilePom 24 | 25 | /** 26 | * Load in the tile, grab the tiles from it if any, delete them 27 | * and return a new StringReader representing the pom. 28 | * @return 29 | */ 30 | @CompileStatic(TypeCheckingMode.SKIP) 31 | Reader strippedPom() { 32 | return tilePom.withReader { Reader reader -> 33 | def slurper = new XmlSlurper(false, false, true).parse(reader) 34 | 35 | if (slurper.tiles) { 36 | slurper.tiles.tile.each { tile -> 37 | tiles.add(tile.text()) 38 | } 39 | 40 | slurper.tiles.replaceNode {} 41 | } 42 | 43 | StringWriter writer = new StringWriter() 44 | XmlUtil.serialize(slurper, writer) 45 | 46 | return new StringReader(writer.toString()) 47 | } 48 | } 49 | 50 | void loadTile(File tilePom) { 51 | this.tilePom = tilePom 52 | 53 | MavenXpp3Reader pomReader = new MavenXpp3Reader() 54 | 55 | model = pomReader.read(strippedPom()) 56 | } 57 | 58 | TileModel() {} 59 | 60 | TileModel(File tilePom, Artifact artifact) { 61 | loadTile(tilePom) 62 | 63 | // this is in the artifact but isn't actually in the file, we need it 64 | // so we can pass it through the parent structure in the TilesModelResolverImpl 65 | 66 | model.modelVersion = "4.0.0" 67 | model.version = artifact.version 68 | model.groupId = artifact.groupId 69 | model.artifactId = artifact.artifactId 70 | model.packaging = "pom" 71 | 72 | // Update each tile'd plugin's execution id with the tile GAV for easier debugging/tracing 73 | if (model.build?.plugins) { 74 | rewritePluginExecutionIds(model.build.plugins, artifact) 75 | } 76 | if (model.profiles) { 77 | model.profiles.each { profile -> 78 | if (profile.build?.plugins) { 79 | rewritePluginExecutionIds(profile.build.plugins, artifact) 80 | } 81 | } 82 | } 83 | 84 | } 85 | 86 | @CompileStatic(TypeCheckingMode.SKIP) 87 | private static List rewritePluginExecutionIds(List plugins, Artifact artifact) { 88 | plugins.each { plugin -> 89 | if (plugin.executions) { 90 | plugin.executions.each { execution -> 91 | if (execution.configuration?.getAttribute("tiles-keep-id") == "true" || execution.configuration?.getChild("tiles-keep-id")?.getValue() == "true") { 92 | // do not rewrite the current execution id 93 | return 94 | } 95 | execution.id = GavUtil.artifactGav(artifact).replaceAll(":", "_") + "__" + execution.id 96 | } 97 | } 98 | } 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /src/main/groovy/io/repaint/maven/tiles/TileValidator.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import groovy.transform.CompileStatic 4 | import org.apache.maven.MavenExecutionException 5 | import org.apache.maven.model.Model 6 | import org.slf4j.Logger 7 | 8 | /** 9 | * 10 | * @author: Richard Vowles - https://plus.google.com/+RichardVowles 11 | * @author: Mark Derricutt - https://plus.google.com/+MarkDerricutt 12 | */ 13 | @CompileStatic 14 | class TileValidator { 15 | 16 | public static final String SMELL_DEPENDENCYMANAGEMENT = "dependencymanagement" 17 | public static final String SMELL_DEPENDENCIES = "dependencies" 18 | public static final String SMELL_REPOSITORIES = "repositories" 19 | public static final String SMELL_PLUGINREPOSITORIES = "pluginrepositories" 20 | public static final String SMELL_PLUGINMANAGEMENT = "pluginmanagement" 21 | 22 | public static final List SMELLS = [SMELL_DEPENDENCIES, SMELL_DEPENDENCYMANAGEMENT, 23 | SMELL_PLUGINREPOSITORIES, SMELL_PLUGINMANAGEMENT, 24 | SMELL_REPOSITORIES] 25 | 26 | Model loadModel(Logger log, File tilePom, String buildSmells) { 27 | TileModel modelLoader = new TileModel() 28 | Model validatedModel = null 29 | 30 | Set collectedBuildSmells = [] 31 | if (buildSmells) { 32 | Collection smells = buildSmells.tokenize(',')*.trim().findAll({ String tok -> return tok.size() > 0 }) 33 | 34 | // this is Mark's fault. 35 | Collection okSmells = smells.collect({ it.toLowerCase() }).intersect(TileValidator.SMELLS) 36 | 37 | Collection stinkySmells = new ArrayList<>(smells).minus(okSmells) 38 | 39 | if (stinkySmells) { 40 | throw new MavenExecutionException("Discovered bad smell configuration ${stinkySmells} from ${buildSmells}.", tilePom) 41 | } 42 | 43 | collectedBuildSmells.addAll(okSmells) 44 | } 45 | 46 | 47 | if (!tilePom) { 48 | log.error("No tile exists") 49 | } else if (!tilePom.exists()) { 50 | log.error("Unable to file tile ${tilePom.absolutePath}") 51 | } else { 52 | modelLoader.loadTile(tilePom) 53 | validatedModel = validateModel(modelLoader.model, log, collectedBuildSmells) 54 | if (validatedModel) { 55 | log.info("Tile passes basic validation.") 56 | } 57 | } 58 | 59 | return validatedModel 60 | } 61 | 62 | /** 63 | * Display all of the errors. 64 | * 65 | * Should we allow name? description? modelVersion? 66 | */ 67 | protected Model validateModel(Model model, Logger log, Set buildSmells) { 68 | Model validModel = model 69 | 70 | if (model.groupId) { 71 | log.error("Tile has a groupid and must not have") 72 | validModel = null 73 | } 74 | 75 | if (model.artifactId) { 76 | log.error("Tile has an artifactid and must not have") 77 | validModel = null 78 | } 79 | 80 | if (model.version) { 81 | log.error("Tile has a version and must not have") 82 | validModel = null 83 | } 84 | 85 | if (model.parent) { 86 | log.error("Tile has a parent and must not have") 87 | validModel = null 88 | } 89 | 90 | if (model.repositories && !buildSmells.contains(SMELL_REPOSITORIES)) { 91 | log.error("Tile follows bad practice and has repositories section. Please use settings.xml.") 92 | validModel = null 93 | } 94 | 95 | if (model.pluginRepositories && !buildSmells.contains(SMELL_PLUGINREPOSITORIES)) { 96 | log.error("Tile follows bad practice and has pluginRepositories section. Please use settings.xml.") 97 | validModel = null 98 | } 99 | 100 | if (model.dependencyManagement && !buildSmells.contains(SMELL_DEPENDENCYMANAGEMENT)) { 101 | log.error("Tile follows bad practice and has dependencyManagement. Please use composites.") 102 | validModel = null 103 | } 104 | 105 | if (model.build?.pluginManagement && !buildSmells.contains(SMELL_PLUGINMANAGEMENT)) { 106 | log.error("Plugin management is usually not required, if you want a plugin to always run, use plugins instead.") 107 | validModel = null 108 | } 109 | 110 | if (model.dependencies && !buildSmells.contains(SMELL_DEPENDENCIES)) { 111 | log.error("Tile includes dependencies - this will prevent consumers from adding exclusions, use composites instead.") 112 | validModel = null 113 | } 114 | 115 | if (model.build?.extensions) { 116 | log.error("Tile has extensions and must not have") 117 | validModel = null 118 | } 119 | 120 | if (model.build?.plugins) { 121 | for (plugin in model.build.plugins) { 122 | if (plugin.extensions) { 123 | log.error("Tile has plugins with extensions and must not have") 124 | validModel = null 125 | break 126 | } 127 | } 128 | } 129 | 130 | return validModel 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /src/main/groovy/io/repaint/maven/tiles/TilesProjectBuilder.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import groovy.transform.CompileStatic 4 | import groovy.transform.TypeCheckingMode 5 | import org.apache.maven.MavenExecutionException 6 | import org.apache.maven.artifact.Artifact 7 | import org.apache.maven.artifact.versioning.ArtifactVersion 8 | import org.apache.maven.artifact.versioning.VersionRange 9 | import org.apache.maven.model.Dependency 10 | import org.apache.maven.model.Plugin 11 | import org.apache.maven.model.building.ModelSource 12 | import org.apache.maven.project.MavenProject 13 | import org.apache.maven.project.ProjectBuilder 14 | import org.apache.maven.project.ProjectBuildingException 15 | import org.apache.maven.project.ProjectBuildingRequest 16 | import org.apache.maven.project.ProjectBuildingResult 17 | 18 | import javax.inject.Inject 19 | import javax.inject.Named 20 | import javax.inject.Singleton 21 | 22 | import static io.repaint.maven.tiles.Constants.TILEPLUGIN_ARTIFACT 23 | import static io.repaint.maven.tiles.Constants.TILEPLUGIN_GROUP 24 | 25 | @CompileStatic 26 | @Singleton 27 | @Named("TilesProjectBuilder") 28 | class TilesProjectBuilder implements ProjectBuilder { 29 | 30 | @Inject 31 | private ProjectBuilder delegate; 32 | 33 | @Override 34 | ProjectBuildingResult build(File pomFile, ProjectBuildingRequest request) throws ProjectBuildingException { 35 | return injectTileDependecies(delegate.build(pomFile, request)) 36 | } 37 | 38 | @Override 39 | ProjectBuildingResult build(ModelSource modelSource, ProjectBuildingRequest request) throws ProjectBuildingException { 40 | return injectTileDependecies(delegate.build(modelSource, request)) 41 | } 42 | 43 | @Override 44 | ProjectBuildingResult build(Artifact artifact, ProjectBuildingRequest request) throws ProjectBuildingException { 45 | return injectTileDependecies(delegate.build(artifact, request)) 46 | } 47 | 48 | @Override 49 | ProjectBuildingResult build(Artifact artifact, boolean allowStubModel, ProjectBuildingRequest request) throws ProjectBuildingException { 50 | return injectTileDependecies(delegate.build(artifact, allowStubModel, request)) 51 | } 52 | 53 | @Override 54 | List build(List pomFiles, boolean recursive, ProjectBuildingRequest request) throws ProjectBuildingException { 55 | return injectTileDependecies(delegate.build(pomFiles, recursive, request)) 56 | } 57 | 58 | @CompileStatic(TypeCheckingMode.SKIP) 59 | private static ProjectBuildingResult injectTileDependecies(ProjectBuildingResult result) { 60 | MavenProject project = result.project 61 | def configuration = project.build.plugins 62 | ?.find({ Plugin plugin -> plugin.groupId == TILEPLUGIN_GROUP && plugin.artifactId == TILEPLUGIN_ARTIFACT}) 63 | ?.configuration 64 | 65 | if (configuration) { 66 | configuration.getChild("tiles")?.children?.each { tile -> 67 | String[] gav = tile.value.tokenize(":") 68 | 69 | if (gav.size() != 3 && gav.size() != 5) { 70 | throw new MavenExecutionException("${tile.value} does not have the form group:artifact:version-range or group:artifact:extension:classifier:version-range", project.file) 71 | } 72 | 73 | boolean found = false 74 | for (int i = project.dependencies.size() - 1; i >= 0; i--) { 75 | Dependency existing = project.dependencies[i] 76 | if (existing.groupId == gav[0] && existing.artifactId == gav[1]) { 77 | found = true 78 | break 79 | } 80 | } 81 | 82 | if (!found) { 83 | // we only need this dependency for maven to build the correct project graph. 84 | // This dependency will be removed when the model is reloaded and merged with tiles 85 | Dependency dependency = new Dependency() 86 | dependency.groupId = gav[0] 87 | dependency.artifactId = gav[1] 88 | dependency.scope = "compile" 89 | if (gav.size() == 3) { 90 | dependency.type = "xml" 91 | dependency.version = extractTileVersion(gav[2]) 92 | } else { 93 | dependency.type = gav[2] 94 | dependency.classifier = gav[3] 95 | dependency.version = extractTileVersion(gav[4]) 96 | } 97 | project.dependencies.add(dependency) 98 | } 99 | } 100 | } 101 | return result 102 | } 103 | 104 | private static ArtifactVersion extractTileVersion(String versionSpec) { 105 | def versionRange = VersionRange.createFromVersionSpec(versionSpec) 106 | def lowerBound = versionRange.restrictions?.get(0)?.lowerBound 107 | return lowerBound != null ? lowerBound : versionRange.recommendedVersion 108 | } 109 | 110 | private static List injectTileDependecies(List list) { 111 | for (ProjectBuildingResult result : list) { 112 | injectTileDependecies(result) 113 | } 114 | return list 115 | } 116 | 117 | } 118 | -------------------------------------------------------------------------------- /src/main/groovy/io/repaint/maven/tiles/ValidateTileMojo.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import groovy.transform.CompileStatic 4 | import org.apache.maven.plugin.MojoExecutionException 5 | import org.apache.maven.plugin.MojoFailureException 6 | import org.apache.maven.plugins.annotations.Mojo 7 | import org.apache.maven.plugins.annotations.ResolutionScope 8 | 9 | /** 10 | * 11 | * @author: Richard Vowles - https://plus.google.com/+RichardVowles 12 | * @author: Mark Derricutt - https://plus.google.com/+MarkDerricutt 13 | */ 14 | @CompileStatic 15 | @Mojo(name = "validate", requiresProject = true, requiresDependencyResolution = ResolutionScope.NONE, threadSafe = true) 16 | class ValidateTileMojo extends AbstractTileMojo { 17 | 18 | @Override 19 | void execute() throws MojoExecutionException, MojoFailureException { 20 | if (project.modules) { 21 | logger.info("Ignoring reactor for tile check.") 22 | } else { 23 | new TileValidator().loadModel(logger, getTile(), buildSmells) 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/resources/tiles.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1.0.0+ 5 | This element describes all of the tiles this project depends on 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/test/groovy/io/repaint/maven/tiles/AttachTileMojoTest.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import io.repaint.maven.tiles.AttachTileMojo 4 | import org.apache.maven.artifact.Artifact 5 | import org.apache.maven.project.MavenProject 6 | import org.apache.maven.project.MavenProjectHelper 7 | import org.junit.Test 8 | import org.slf4j.Logger 9 | 10 | /** 11 | * 12 | * @author: Richard Vowles - https://plus.google.com/+RichardVowles 13 | * @author: Mark Derricutt - https://plus.google.com/+MarkDerricutt 14 | */ 15 | class AttachTileMojoTest { 16 | 17 | 18 | private File makeAttachTileMojo(String packaging) { 19 | 20 | File foundTile = null 21 | 22 | AttachTileMojo attach = new AttachTileMojo() { 23 | @Override 24 | File getTile() { 25 | return new File("src/test/resources/session-license-tile.xml") 26 | } 27 | } 28 | 29 | attach.project = [ 30 | getPackaging: { -> return packaging }, 31 | getArtifact: { -> return [ 32 | setFile: { File tile -> 33 | foundTile = tile; 34 | } 35 | ] as Artifact} 36 | ] as MavenProject 37 | 38 | attach.projectHelper = [ 39 | attachArtifact: { MavenProject project, String attachedPackaging, File tile -> 40 | foundTile = tile 41 | } 42 | ] as MavenProjectHelper 43 | 44 | attach.logger = [ 45 | info: { String msg -> println msg }, 46 | error: { String msg, Throwable t = null -> 47 | println msg 48 | if (t) { t.printStackTrace() } 49 | }, 50 | warn: { String msg -> println msg } 51 | ] as Logger 52 | 53 | attach.execute() 54 | 55 | foundTile 56 | } 57 | 58 | @Test 59 | public void attachingTileWithJarProject() { 60 | assert makeAttachTileMojo("jar").exists() 61 | } 62 | 63 | @Test 64 | public void attachingTileWithTileProject() { 65 | assert makeAttachTileMojo("tile").exists() 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/test/groovy/io/repaint/maven/tiles/TileModelTest.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import io.repaint.maven.tiles.TileModel 4 | import org.apache.maven.artifact.Artifact 5 | import org.apache.maven.artifact.DefaultArtifact 6 | import org.apache.maven.artifact.handler.DefaultArtifactHandler 7 | import org.apache.maven.artifact.versioning.VersionRange 8 | import org.junit.Test 9 | 10 | /** 11 | * 12 | * @author: Richard Vowles - https://plus.google.com/+RichardVowles 13 | */ 14 | class TileModelTest { 15 | @Test 16 | public void testLoad() { 17 | def loader = new TileModel() 18 | loader.loadTile(new File("src/test/resources/extended-syntax-tile.xml")) 19 | assert loader.tiles.size() == 2 20 | } 21 | 22 | @Test 23 | public void testReplaceExecutionId() { 24 | Artifact artifact = new DefaultArtifact("io.repaint.tiles", 25 | "execution-id-replacing-tile", 26 | VersionRange.createFromVersion("1.1-SNAPSHOT"), 27 | "compile", 28 | "xml", 29 | "", 30 | new DefaultArtifactHandler("xml")) 31 | 32 | TileModel tileModel = new TileModel(new File("src/test/resources/execution-id-tile.xml"), artifact) 33 | 34 | assert tileModel.model.build.plugins[0].executions[0].id == "io.repaint.tiles_execution-id-replacing-tile_1.1-SNAPSHOT__1" 35 | assert tileModel.model.build.plugins[0].executions[1].id == "2" 36 | assert tileModel.model.build.plugins[0].executions[2].id == "3" 37 | assert tileModel.model.profiles[0].build.plugins[0].executions[0].id == "io.repaint.tiles_execution-id-replacing-tile_1.1-SNAPSHOT__4" 38 | assert tileModel.model.profiles[0].build.plugins[0].executions[1].id == "5" 39 | assert tileModel.model.profiles[0].build.plugins[0].executions[2].id == "6" 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/test/groovy/io/repaint/maven/tiles/TileValidatorTest.groovy: -------------------------------------------------------------------------------- 1 | package io.repaint.maven.tiles 2 | 3 | import io.repaint.maven.tiles.TileValidator 4 | import org.junit.Before 5 | import org.junit.Test 6 | import org.slf4j.Logger 7 | 8 | /** 9 | * 10 | * @author: Richard Vowles - https://plus.google.com/+RichardVowles 11 | */ 12 | class TileValidatorTest { 13 | List errors 14 | List warnings 15 | List infos 16 | Logger logger 17 | 18 | @Before 19 | public void before() { 20 | errors = [] 21 | warnings = [] 22 | infos = [] 23 | logger = [ 24 | info: { String msg -> infos << msg }, 25 | error: { String msg, Throwable t = null -> errors << msg }, 26 | warn: { String msg -> warnings << msg } 27 | ] as Logger 28 | } 29 | 30 | @Test 31 | public void testValidation() { 32 | new TileValidator().loadModel(logger, new File("src/test/resources/bad-tile.xml"), "") 33 | 34 | assert errors.size() == 10 35 | assert warnings.size() == 0 36 | assert infos.size() == 0 37 | } 38 | 39 | @Test void testNoFile() { 40 | new TileValidator().loadModel(logger, null, "") 41 | 42 | assert errors.size() == 1 43 | assert warnings.size() == 0 44 | assert infos.size() == 0 45 | } 46 | 47 | @Test void noSuchFileExists() { 48 | new TileValidator().loadModel(logger, new File("skink.txt"), "") 49 | 50 | assert errors.size() == 1 51 | assert warnings.size() == 0 52 | assert infos.size() == 0 53 | } 54 | 55 | @Test void okFile() { 56 | new TileValidator().loadModel(logger, new File("src/test/resources/session-license-tile.xml"), "") 57 | assert errors.size() == 0 58 | assert warnings.size() == 0 59 | assert infos.size() == 1 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/test/resources/antrun1-pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 18 | 4.0.0 19 | groupid 20 | antrun1-tile 21 | 1.1-SNAPSHOT 22 | tile 23 | Maven Tile - Antrun 1 24 | 25 | 26 | 27 | 28 | this 29 | is-not 30 | used 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/test/resources/antrun1-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | 8 | 9 | org.apache.maven.plugins 10 | maven-antrun-plugin 11 | 1.7 12 | 13 | 14 | print-antrun1 15 | validate 16 | 17 | 18 | 19 | 20 | 21 | 22 | run 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/test/resources/antrun2-pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 18 | 4.0.0 19 | groupid 20 | antrun2-tile 21 | 1.1-SNAPSHOT 22 | tile 23 | Maven Tile - Antrun 2 24 | 25 | -------------------------------------------------------------------------------- /src/test/resources/antrun2-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | 8 | 9 | 10 | mine 11 | is bigger 12 | 1.1 13 | 14 | 15 | 16 | 17 | 18 | 19 | mine 20 | http://there.com 21 | 22 | 23 | 24 | 25 | 26 | mine 27 | http://there.com 28 | 29 | 30 | 31 | 32 | 33 | this 34 | is-a-dependency 35 | 1.1 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | org.apache.maven.plugins 44 | maven-antsquash-plugin 45 | 1.7 46 | 47 | 48 | 49 | 50 | 51 | org.apache.maven.plugins 52 | maven-antrun-plugin 53 | 1.7 54 | 55 | 56 | print-antrun2 57 | validate 58 | 59 | 60 | 61 | 62 | 63 | 64 | run 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/test/resources/bad-smelly-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | 8 | 1 9 | 2 10 | 11 | 12 | 13 | 14 | The Apache Software License, Version 2.0 15 | http://www.apache.org/licenses/LICENSE-2.0.txt 16 | repo 17 | 18 | 19 | 20 | 21 | 22 | 23 | io.repaint.maven 24 | tiles-maven-plugin 25 | 26 | dependencymanagement,dependencies,repositories,unknown 27 | 28 | groupid:antrun1-tile:1.1-SNAPSHOT 29 | groupid:antrun2-tile:1.1-SNAPSHOT 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/test/resources/bad-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 4.0.0 9 | 10 | com.bluetrainsoftware.maven.tiles 11 | parent-tile 12 | 1.1-SNAPSHOT 13 | 14 | 15 | com.bluetrainsoftware.maven.tiles 16 | session-license-tile 17 | 1.1-SNAPSHOT 18 | tile 19 | Maven Tile - Lilcense 20 | 21 | 22 | 23 | never 24 | 25 | 26 | 27 | 28 | 29 | do-this 30 | 31 | 32 | 33 | 34 | 35 | 36 | group 37 | artifact 38 | version 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | io.repaint.maven 48 | tiles-maven-plugin 49 | 1.1-SNAPSHOT 50 | true 51 | 52 | 53 | 54 | 55 | 56 | group 57 | artifact 58 | version 59 | true 60 | 61 | 62 | 63 | 64 | group 65 | artifact 66 | version 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/test/resources/duplicate-tile-pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 18 | 4.0.0 19 | io.repaint.tiles 20 | simple-project 21 | 1.1-SNAPSHOT 22 | jar 23 | Maven Tile - Lilcense 24 | 25 | 26 | 27 | The Apache Software License, Version 2.0 28 | http://www.apache.org/licenses/LICENSE-2.0.txt 29 | repo 30 | 31 | 32 | 33 | 34 | 35 | 36 | io.repaint.maven 37 | tiles-maven-plugin 38 | 1.4-SNAPSHOT 39 | true 40 | 41 | 42 | io.repaint.tiles:smelly-tile:1.1 43 | io.repaint.tiles:release-tile:1.1 44 | io.repaint.tiles:release-tile:1.1 45 | io.repaint.tiles:release-tile:1.1 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/test/resources/empty-pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | io.repaint.tiles 7 | empty-pom 8 | 1.1-SNAPSHOT 9 | tile 10 | empty pom 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/test/resources/execution-id-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 18 | 4.0.0 19 | 20 | 21 | 22 | 23 | test 24 | test 25 | 1.0 26 | 27 | 28 | 1 29 | 30 | 31 | 2 32 | 33 | 34 | 35 | 3 36 | 37 | true 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | test 47 | 48 | 49 | 50 | test 51 | test 52 | 1.0 53 | 54 | 55 | 4 56 | 57 | 58 | 5 59 | 60 | 61 | 62 | 6 63 | 64 | true 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /src/test/resources/extended-syntax-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 18 | 4.0.0 19 | 20 | 21 | 1 22 | 2 23 | 24 | 25 | 26 | 27 | The Apache Software License, Version 2.0 28 | http://www.apache.org/licenses/LICENSE-2.0.txt 29 | repo 30 | 31 | 32 | 33 | 34 | groupid:antrun1-tile:1.1-SNAPSHOT 35 | groupid:antrun2-tile:1.1-SNAPSHOT 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/test/resources/filtering/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 18 | 4.0.0 19 | io.repaint.tiles 20 | filtering-tile 21 | 1.1-SNAPSHOT 22 | tile 23 | 24 | 25 | 26 | io.repaint.maven 27 | tiles-maven-plugin 28 | 1.1-SNAPSHOT 29 | true 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/test/resources/filtering/tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | 8 | groupid:antrun1-tile:@project.version@ 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/test/resources/full-tile-load-pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 18 | 4.0.0 19 | io.repaint.tiles 20 | simple-project 21 | 1.1-SNAPSHOT 22 | jar 23 | Maven Tile - Lilcense 24 | 25 | 26 | 27 | The Apache Software License, Version 2.0 28 | http://www.apache.org/licenses/LICENSE-2.0.txt 29 | repo 30 | 31 | 32 | 33 | 34 | 35 | 36 | io.repaint.maven 37 | tiles-maven-plugin 38 | 1.4-SNAPSHOT 39 | true 40 | 41 | 42 | io.repaint.tiles:smelly-tile:1.1 43 | io.repaint.tiles:release-tile:1.1 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/test/resources/invalid-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 4.0.0 7 | 8 | 9 | 1 10 | 2 11 | 12 | 13 | 14 | 15 | The Apache Software License, Version 2.0 16 | http://www.apache.org/licenses/LICENSE-2.0.txt 17 | repo 18 | 19 | 20 | 21 | 22 | 23 | io.repaint.maven 24 | tiles-maven-plugin 25 | 26 | 27 | groupid:antrun1-tile:1.1-SNAPSHOT 28 | groupid:antrun2-tile:1.1-SNAPSHOT 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/test/resources/not-a-tile-file.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/test/resources/release-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 17 | 4.0.0 18 | 19 | 20 | sonatype-staging 21 | oss.sonatype.org Staging Repository 22 | http://oss.sonatype.org/service/local/staging/deploy/maven2/ 23 | 24 | 25 | sonatype-snapshots 26 | oss.sonatype.org Snapshot Repository 27 | https://oss.sonatype.org/content/repositories/snapshots/ 28 | 29 | 30 | 31 | 32 | 33 | 34 | sonatype 35 | 36 | 37 | performRelease 38 | true 39 | 40 | 41 | 42 | 43 | 44 | org.apache.maven.plugins 45 | maven-gpg-plugin 46 | 1.1 47 | 48 | 49 | sign-artifacts 50 | verify 51 | 52 | sign 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | org.apache.maven.plugins 66 | maven-scm-plugin 67 | 1.9 68 | 69 | 70 | 71 | org.apache.maven.plugins 72 | maven-enforcer-plugin 73 | 1.2 74 | 75 | 76 | 77 | 78 | [3.2.2,) 79 | 80 | 81 | 82 | No Snapshots Allowed! 83 | true 84 | true 85 | 86 | 87 | 88 | commons-logging 89 | commons-logging-api 90 | 91 | 92 | 93 | true 94 | 95 | 96 | 97 | 98 | maven-release-plugin 99 | 2.6 100 | 101 | forked-path 102 | -Drepaint.release=release 103 | clean enforcer:enforce verify 104 | enforcer:enforce deploy 105 | release/${project.groupId}/ 106 | false 107 | true 108 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /src/test/resources/session-license-pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 18 | 4.0.0 19 | io.repaint.tiles 20 | session-license-tile 21 | 1.1-SNAPSHOT 22 | tile 23 | Maven Tile - Lilcense 24 | 25 | 26 | 27 | The Apache Software License, Version 2.0 28 | http://www.apache.org/licenses/LICENSE-2.0.txt 29 | repo 30 | 31 | 32 | 33 | 34 | 35 | 36 | io.repaint.maven 37 | tiles-maven-plugin 38 | 1.1-SNAPSHOT 39 | true 40 | 41 | 42 | i:dont:exist 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/test/resources/session-license-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 18 | 4.0.0 19 | 20 | 21 | 1 22 | 2 23 | 24 | 25 | 26 | 27 | The Apache Software License, Version 2.0 28 | http://www.apache.org/licenses/LICENSE-2.0.txt 29 | repo 30 | 31 | 32 | 33 | 34 | 35 | 36 | io.repaint.maven 37 | tiles-maven-plugin 38 | 39 | 40 | groupid:antrun1-tile:1.1-SNAPSHOT 41 | groupid:antrun2-tile:1.1-SNAPSHOT 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/test/resources/smelly-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | 8 | 1 9 | 2 10 | 11 | 12 | 13 | 14 | The Apache Software License, Version 2.0 15 | http://www.apache.org/licenses/LICENSE-2.0.txt 16 | repo 17 | 18 | 19 | 20 | 21 | groupid:antrun2-tile:1.1-SNAPSHOT 22 | 23 | 24 | 25 | 26 | 27 | io.repaint.maven 28 | tiles-maven-plugin 29 | 30 | dependencymanagement,dependencies,repositories,pluginrepositories 31 | 32 | groupid:antrun1-tile:1.1-SNAPSHOT 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/test/resources/test-merge-tile/kapt-dinject-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | Add KAPT annotation processor to generate DInject Dependency injection (as java source code). 7 | 8 | 9 | 10 | 1.8 11 | true 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | org.jetbrains.kotlin 20 | kotlin-maven-plugin 21 | 22 | 23 | 24 | kapt 25 | 26 | 27 | 28 | io.dinject 29 | dinject-generator 30 | ${dinject-generator.version} 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/test/resources/test-merge-tile/kapt-javalin-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | Add KAPT annotation processor to generate javalin controllers (as java source code). 7 | 8 | 9 | 10 | true 11 | 12 | 13 | 14 | 15 | 16 | 17 | org.jetbrains.kotlin 18 | kotlin-maven-plugin 19 | 20 | 21 | 22 | kapt 23 | 24 | 25 | 26 | 27 | io.dinject 28 | javalin-generator 29 | 1.6 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/test/resources/test-merge-tile/kapt-tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | Kotlin compiler with KAPT annotation processing support. 6 | 7 | 8 | 9 | true 10 | 1.8 11 | 1.3.31 12 | 1.3 13 | 1.8 14 | UTF-8 15 | 16 | 17 | 18 | src/main/kotlin 19 | src/test/kotlin 20 | 21 | 22 | 23 | 24 | org.jetbrains.kotlin 25 | kotlin-maven-plugin 26 | ${kotlin.version} 27 | 28 | ${kotlin.apiVersion} 29 | ${kotlin.jvmTarget} 30 | 31 | 32 | 33 | 34 | kapt 35 | 36 | kapt 37 | 38 | 39 | 40 | src/main/kotlin 41 | src/main/java 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | compile 54 | compile 55 | 56 | compile 57 | 58 | 59 | 60 | 61 | test-compile 62 | test-compile 63 | 64 | test-compile 65 | 66 | 67 | 68 | 69 | 70 | 71 | org.apache.maven.plugins 72 | maven-compiler-plugin 73 | 3.8.0 74 | 75 | ${java.version} 76 | ${java.version} 77 | 78 | 79 | 80 | 81 | default-compile 82 | none 83 | 84 | 85 | 86 | 87 | default-testCompile 88 | none 89 | 90 | 91 | 92 | 93 | java-compile 94 | compile 95 | 96 | compile 97 | 98 | 99 | 100 | 101 | java-test-compile 102 | test-compile 103 | 104 | testCompile 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /src/test/resources/test-merge-tile/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 18 | 4.0.0 19 | io.repaint.tiles 20 | test-tile-merge 21 | 1.1-SNAPSHOT 22 | tile 23 | 24 | 25 | 26 | io.repaint.maven 27 | tiles-maven-plugin 28 | 1.1-SNAPSHOT 29 | true 30 | 31 | 32 | 33 | 34 | --------------------------------------------------------------------------------