├── .gitignore ├── LICENSE ├── README.md ├── builder-api ├── .gitignore ├── README.md ├── pom.xml └── src │ ├── main │ └── java │ │ └── net │ │ └── java │ │ └── javabuild │ │ ├── Builder.java │ │ ├── BuilderFolders.java │ │ ├── Execute.java │ │ └── Phase.java │ ├── site │ ├── markdown │ │ └── index.md │ └── site.xml │ └── test │ └── java │ └── net │ └── java │ └── javabuild │ ├── AnnotationsTest.java │ └── PhaseTest.java ├── builder-maven-plugin ├── .gitignore ├── README.md ├── pom.xml └── src │ ├── it │ ├── builder-maven-plugin-test-empty │ │ └── pom.xml │ └── builder-maven-plugin-test │ │ ├── README.md │ │ ├── pom.xml │ │ ├── src │ │ ├── build │ │ │ └── java │ │ │ │ └── test │ │ │ │ ├── ClassGenerator.java │ │ │ │ ├── CopyResourcesToWarBuilder.java │ │ │ │ ├── DatabaseStarter.java │ │ │ │ ├── HelloWorldBuilder.java │ │ │ │ └── ThymeleafPagesGenerator.java │ │ ├── main │ │ │ ├── java │ │ │ │ └── test │ │ │ │ │ └── MyDao.java │ │ │ ├── resources │ │ │ │ ├── home.html │ │ │ │ ├── home.properties │ │ │ │ ├── home_fr.properties │ │ │ │ └── inc.html │ │ │ └── webapp │ │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ └── test │ │ │ ├── java │ │ │ └── test │ │ │ │ └── MyDaoTest.java │ │ │ └── resources │ │ │ └── create_test_database.sql │ │ └── verify.bsh │ ├── main │ ├── java │ │ └── net │ │ │ └── java │ │ │ └── javabuild │ │ │ ├── AddSourceMojo.java │ │ │ ├── BuildClassLoader.java │ │ │ ├── BuildPlan.java │ │ │ ├── CompileMojo.java │ │ │ ├── ExecuteMojo.java │ │ │ ├── MavenBuilderExtension.java │ │ │ ├── MethodInvocation.java │ │ │ └── SourceFoldersUtils.java │ └── resources │ │ ├── META-INF │ │ └── m2e │ │ │ └── lifecycle-mapping-metadata.xml │ │ └── net │ │ └── java │ │ └── javabuild │ │ └── version.properties │ └── site │ ├── markdown │ ├── index.md │ └── usage.md │ └── site.xml ├── pom.xml └── src └── site ├── markdown └── index.md ├── resources └── images │ ├── ScreenShot001.png │ └── ScreenShot002.png └── site.xml /.gitignore: -------------------------------------------------------------------------------- 1 | /.project 2 | /.settings/ 3 | /target/ 4 | /bin/ 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # builder-parent 2 | 3 | This project contains the site home page and some common plugins and versions used by builder-api and builder-maven-plugin projects 4 | -------------------------------------------------------------------------------- /builder-api/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /builder-api/README.md: -------------------------------------------------------------------------------- 1 | # builder-api 2 | -------------------------------------------------------------------------------- /builder-api/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | builder-api 5 | 6 | net.java.javabuild 7 | builder-parent 8 | 1.2-SNAPSHOT 9 | .. 10 | 11 | 12 | 13 | junit 14 | junit 15 | 4.12 16 | test 17 | 18 | 19 | 20 | 21 | 22 | com.github.github 23 | site-maven-plugin 24 | 25 | builder-api 26 | true 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | org.apache.maven.plugins 35 | maven-javadoc-plugin 36 | 2.10.3 37 | 38 | 39 | 40 | builder-api 41 | -------------------------------------------------------------------------------- /builder-api/src/main/java/net/java/javabuild/Builder.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Inherited; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | @Documented 11 | @Retention(RetentionPolicy.RUNTIME) 12 | @Target(ElementType.TYPE) 13 | @Inherited 14 | public @interface Builder { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /builder-api/src/main/java/net/java/javabuild/BuilderFolders.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | public class BuilderFolders { 4 | private BuilderFolders() { 5 | // Do not instantiate, only constants 6 | } 7 | 8 | public final static String BUILD_SOURCES = "src/build/java/"; 9 | public final static String BUILD_RESOURCES = "src/build/resources/"; 10 | public final static String GENERATED_SOURCES = "target/builder/main/java/"; 11 | public final static String GENERATED_RESOURCES = "target/builder/main/resources/"; 12 | public final static String GENERATED_TEST_SOURCES = "target/builder/test/java/"; 13 | public final static String GENERATED_TEST_RESOURCES = "target/builder/test/resources/"; 14 | public final static String WEBAPP_RESOURCES = "target/builder/main/webapp/"; 15 | public final static String SITE = "target/builder/site/"; 16 | } 17 | -------------------------------------------------------------------------------- /builder-api/src/main/java/net/java/javabuild/Execute.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Inherited; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | @Documented 11 | @Retention(RetentionPolicy.RUNTIME) 12 | @Target(ElementType.METHOD) 13 | @Inherited 14 | public @interface Execute { 15 | /** 16 | * Phase (required). 17 | * 18 | * @return the Phase 19 | */ 20 | Phase phase(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /builder-api/src/main/java/net/java/javabuild/Phase.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | public enum Phase { 4 | // Too early 5 | // VALIDATE("validate"), INITIALIZE("initialize"), 6 | GENERATE_SOURCES("generate-sources"), PROCESS_SOURCES("process-sources"), GENERATE_RESOURCES( 7 | "generate-resources"), PROCESS_RESOURCES("process-resources"), COMPILE( 8 | "compile"), PROCESS_CLASSES("process-classes"), GENERATE_TEST_SOURCES( 9 | "generate-test-sources"), PROCESS_TEST_SOURCES( 10 | "process-test-sources"), GENERATE_TEST_RESOURCES( 11 | "generate-test-resources"), PROCESS_TEST_RESOURCES( 12 | "process-test-resources"), TEST_COMPILE("test-compile"), PROCESS_TEST_CLASSES( 13 | "process-test-classes"), TEST("test"), PREPARE_PACKAGE( 14 | "prepare-package"), PACKAGE("package"), PRE_INTEGRATION_TEST( 15 | "pre-integration-test"), INTEGRATION_TEST("integration-test"), POST_INTEGRATION_TEST( 16 | "post-integration-test"), VERIFY("verify"), INSTALL("install"), DEPLOY( 17 | "deploy"), 18 | // Build classes not available 19 | // PRE_CLEAN("pre-clean"), CLEAN("clean"), POST_CLEAN("post-clean"), 20 | PRE_SITE("pre-site"), SITE("site"), POST_SITE("post-site"), SITE_DEPLOY( 21 | "site-deploy"); 22 | 23 | private final String id; 24 | 25 | Phase(String id) { 26 | this.id = id; 27 | } 28 | 29 | public String id() { 30 | return this.id; 31 | } 32 | 33 | @Override 34 | public String toString() { 35 | return id; 36 | } 37 | 38 | public static Phase fromString(String text) { 39 | if (text != null) { 40 | for (Phase phase : Phase.values()) { 41 | if (text.equals(phase.id)) { 42 | return phase; 43 | } 44 | } 45 | } 46 | return null; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /builder-api/src/site/markdown/index.md: -------------------------------------------------------------------------------- 1 | ## Builder-api 2 | 3 | This project contains all the annotations you need to bind your build classes to the maven standard lifecycle. 4 | -------------------------------------------------------------------------------- /builder-api/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 25 | 26 | 27 | 28 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 29 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 30 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 31 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 32 | 33 | ga('create', 'UA-72904650-1', 'auto'); 34 | ga('send', 'pageview'); 35 | ]]> 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /builder-api/src/test/java/net/java/javabuild/AnnotationsTest.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | import net.java.javabuild.Builder; 4 | import net.java.javabuild.Execute; 5 | import net.java.javabuild.Phase; 6 | 7 | @Builder 8 | public class AnnotationsTest { 9 | 10 | @Execute(phase = Phase.DEPLOY) 11 | public void sayHello() { 12 | 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /builder-api/src/test/java/net/java/javabuild/PhaseTest.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | import net.java.javabuild.Phase; 7 | 8 | public class PhaseTest { 9 | 10 | @Test 11 | public void testFromString() { 12 | Assert.assertNotNull(Phase.fromString("generate-sources")); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /builder-maven-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | /.settings/ 3 | /.classpath 4 | /.project 5 | -------------------------------------------------------------------------------- /builder-maven-plugin/README.md: -------------------------------------------------------------------------------- 1 | Plugin documentation is available here: 2 | 3 | https://javabuild.java.net/builder-maven-plugin/usage.html 4 | -------------------------------------------------------------------------------- /builder-maven-plugin/pom.xml: -------------------------------------------------------------------------------- 1 | 11 | 13 | 4.0.0 14 | builder-maven-plugin 15 | maven-plugin 16 | 17 | net.java.javabuild 18 | builder-parent 19 | 1.2-SNAPSHOT 20 | .. 21 | 22 | 23 | 24 | org.apache.maven 25 | maven-core 26 | 3.3.3 27 | provided 28 | 29 | 30 | org.slf4j 31 | slf4j-api 32 | 1.7.5 33 | provided 34 | 35 | 36 | org.apache.maven 37 | maven-plugin-api 38 | 3.3.3 39 | 40 | 41 | org.apache.maven.plugin-tools 42 | maven-plugin-annotations 43 | 3.4 44 | provided 45 | 46 | 47 | org.apache.maven.plugins 48 | maven-compiler-plugin 49 | 3.3 50 | maven-plugin 51 | 52 | 53 | org.codehaus.plexus 54 | plexus-component-annotations 55 | 1.5.5 56 | 57 | 58 | org.apache.maven 59 | maven-model 60 | 3.3.3 61 | maven-plugin 62 | 63 | 64 | net.java.javabuild 65 | builder-api 66 | ${project.version} 67 | 68 | 69 | commons-io 70 | commons-io 71 | 2.4 72 | 73 | 74 | org.apache.maven.reporting 75 | maven-reporting-api 76 | 3.0 77 | 78 | 79 | org.apache.maven.reporting 80 | maven-reporting-impl 81 | 2.3 82 | 83 | 84 | org.apache.maven.doxia 85 | doxia-sink-api 86 | 1.6 87 | 88 | 89 | 90 | 91 | 92 | src/main/resources 93 | true 94 | 95 | 96 | 97 | 98 | maven-plugin-plugin 99 | 3.4 100 | 101 | 102 | default-descriptor 103 | process-classes 104 | 105 | 106 | 107 | 108 | org.codehaus.plexus 109 | plexus-component-metadata 110 | 1.5.5 111 | 112 | 113 | 114 | generate-metadata 115 | generate-test-metadata 116 | 117 | 118 | 119 | 120 | 121 | org.apache.maven.plugins 122 | maven-site-plugin 123 | 3.4 124 | 125 | 126 | org.apache.maven.plugins 127 | maven-project-info-reports-plugin 128 | 2.8 129 | 130 | 131 | maven-invoker-plugin 132 | 2.0.0 133 | 134 | false 135 | true 136 | src/it 137 | ${project.build.directory}/it 138 | setup 139 | verify 140 | 141 | */pom.xml 142 | 143 | 144 | 145 | 146 | integration-test 147 | 148 | install 149 | integration-test 150 | verify 151 | 152 | 153 | 154 | 155 | 156 | com.github.github 157 | site-maven-plugin 158 | 159 | builder-maven-plugin 160 | true 161 | 162 | 163 | 164 | 165 | 166 | 168 | 169 | org.eclipse.m2e 170 | lifecycle-mapping 171 | 1.0.0 172 | 173 | 174 | 175 | 176 | 177 | org.apache.maven.plugins 178 | maven-plugin-plugin 179 | [3.4,) 180 | 181 | descriptor 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | org.codehaus.plexus 191 | plexus-component-metadata 192 | [1.5.5,) 193 | 194 | generate-metadata 195 | generate-test-metadata 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | maven-plugin-plugin 213 | 3.4 214 | 215 | 216 | 217 | builder-maven-plugin 218 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test-empty/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | net.java.javabuild 5 | builder-maven-plugin-test-empty 6 | 1.0 7 | jar 8 | 9 | UTF-8 10 | 1.7 11 | 1.7 12 | 13 | 14 | 15 | 16 | net.java.javabuild 17 | builder-maven-plugin 18 | @project.version@ 19 | true 20 | 21 | 22 | 23 | add-source 24 | 25 | add-source 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | net.java.javabuild 35 | builder-api 36 | @project.version@ 37 | test 38 | 39 | 40 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/README.md: -------------------------------------------------------------------------------- 1 | ## builder-maven-plugin examples 2 | 3 | This projects contains examples of builder-maven-plugin usages: 4 | * display "hello world" in maven logs 5 | * add resources to a war package 6 | * start an embedded database before tests 7 | * generate pages using project Thymeleaf templates and include them in the project's documentation 8 | * generate java code 9 | 10 | 11 | For how to configure the plugin, see the pom.xml 12 | 13 | For the examples, see the classes in src/build/java/ -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | net.java.javabuild 5 | builder-maven-plugin-test 6 | 1.0 7 | war 8 | 9 | UTF-8 10 | 1.7 11 | 1.7 12 | 13 | 14 | 15 | 16 | net.java.javabuild 17 | builder-maven-plugin 18 | @project.version@ 19 | true 20 | 21 | 22 | 23 | add-source 24 | 25 | add-source 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | net.java.javabuild 35 | builder-api 36 | @project.version@ 37 | test 38 | 39 | 40 | org.slf4j 41 | slf4j-api 42 | 1.5.3 43 | test 44 | 45 | 46 | org.slf4j 47 | slf4j-simple 48 | 1.5.3 49 | test 50 | 51 | 52 | org.webjars 53 | bootstrap 54 | 3.3.4 55 | test 56 | 57 | 58 | commons-io 59 | commons-io 60 | 2.4 61 | test 62 | 63 | 64 | com.squareup 65 | javapoet 66 | 1.1.0 67 | test 68 | 69 | 70 | org.thymeleaf 71 | thymeleaf 72 | 2.1.4.RELEASE 73 | 74 | 75 | com.h2database 76 | h2 77 | 1.4.187 78 | 79 | 80 | junit 81 | junit 82 | 4.12 83 | test 84 | 85 | 86 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/build/java/test/ClassGenerator.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | 6 | import javax.lang.model.element.Modifier; 7 | 8 | import com.squareup.javapoet.JavaFile; 9 | import com.squareup.javapoet.MethodSpec; 10 | import com.squareup.javapoet.TypeSpec; 11 | 12 | import net.java.javabuild.Builder; 13 | import net.java.javabuild.BuilderFolders; 14 | import net.java.javabuild.Execute; 15 | import net.java.javabuild.Phase; 16 | 17 | /** 18 | * A builder that generates a java class. 19 | */ 20 | @Builder 21 | public class ClassGenerator { 22 | 23 | @Execute(phase = Phase.GENERATE_SOURCES) 24 | public void generateHelloWorldClass() throws IOException { 25 | 26 | MethodSpec main = MethodSpec 27 | .methodBuilder("main") 28 | .addModifiers(Modifier.PUBLIC, Modifier.STATIC) 29 | .returns(void.class) 30 | .addParameter(String[].class, "args") 31 | .addStatement("$T.out.println($S)", System.class, 32 | "Hello world!").build(); 33 | 34 | TypeSpec helloWorld = TypeSpec.classBuilder("HelloWorld") 35 | .addModifiers(Modifier.PUBLIC, Modifier.FINAL).addMethod(main) 36 | .build(); 37 | 38 | JavaFile javaFile = JavaFile.builder("com.example.helloworld", 39 | helloWorld).build(); 40 | 41 | javaFile.writeTo(new File(BuilderFolders.GENERATED_SOURCES)); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/build/java/test/CopyResourcesToWarBuilder.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | 7 | import org.apache.commons.io.FileUtils; 8 | import org.apache.commons.io.IOUtils; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | 12 | import net.java.javabuild.Builder; 13 | import net.java.javabuild.BuilderFolders; 14 | import net.java.javabuild.Execute; 15 | import net.java.javabuild.Phase; 16 | 17 | /** 18 | * A builder that copies resources from a webjar into the war. 19 | */ 20 | @Builder 21 | public class CopyResourcesToWarBuilder { 22 | 23 | private final static Logger LOGGER = LoggerFactory 24 | .getLogger(CopyResourcesToWarBuilder.class); 25 | 26 | private File warRoot = new File(BuilderFolders.WEBAPP_RESOURCES); 27 | 28 | @Execute(phase = Phase.PREPARE_PACKAGE) 29 | public void addFileToWebapp() throws IOException { 30 | LOGGER.info("Hello world from package phase!"); 31 | warRoot.mkdirs(); 32 | copyResourceFromWebjar("bootstrap/3.3.4/css/bootstrap.css"); 33 | copyResourceFromWebjar("bootstrap/3.3.4/js/bootstrap.js"); 34 | } 35 | 36 | private void copyResourceFromWebjar(String src) throws IOException { 37 | File targetFile = new File(warRoot, src); 38 | InputStream srcInputStream = this.getClass().getClassLoader() 39 | .getResourceAsStream("META-INF/resources/webjars/" + src); 40 | FileUtils.writeByteArrayToFile(targetFile, 41 | IOUtils.toByteArray(srcInputStream)); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/build/java/test/DatabaseStarter.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.sql.Connection; 6 | import java.sql.DriverManager; 7 | import java.sql.SQLException; 8 | import java.util.Iterator; 9 | import java.util.List; 10 | 11 | import org.apache.commons.io.FileUtils; 12 | import org.h2.tools.Server; 13 | import org.slf4j.Logger; 14 | import org.slf4j.LoggerFactory; 15 | 16 | import net.java.javabuild.Builder; 17 | import net.java.javabuild.Execute; 18 | import net.java.javabuild.Phase; 19 | 20 | /** 21 | * A builder that starts a h2database and creates a schema before tests. 22 | */ 23 | @Builder 24 | public class DatabaseStarter { 25 | private final static Logger LOGGER = LoggerFactory 26 | .getLogger(DatabaseStarter.class); 27 | Server server; 28 | 29 | @Execute(phase = Phase.PROCESS_TEST_CLASSES) 30 | public void startServer() throws IOException, SQLException, 31 | ClassNotFoundException { 32 | server = Server.createTcpServer(); 33 | server.start(); 34 | LOGGER.info("Database started"); 35 | Class.forName("org.h2.Driver"); 36 | Connection conn = DriverManager.getConnection( 37 | "jdbc:h2:tcp://localhost/~/test", "sa", ""); 38 | List sqls = FileUtils.readLines(new File( 39 | "src/test/resources/create_test_database.sql")); 40 | for (Iterator iterator = sqls.iterator(); iterator.hasNext();) { 41 | String sql = iterator.next(); 42 | LOGGER.info(sql); 43 | conn.prepareStatement(sql).executeUpdate(); 44 | } 45 | conn.close(); 46 | } 47 | 48 | @Execute(phase = Phase.TEST) 49 | public void stopServer() throws IOException, SQLException { 50 | server.stop(); 51 | LOGGER.info("Database stopped"); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/build/java/test/HelloWorldBuilder.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import org.slf4j.Logger; 4 | import org.slf4j.LoggerFactory; 5 | 6 | import net.java.javabuild.Builder; 7 | import net.java.javabuild.Execute; 8 | import net.java.javabuild.Phase; 9 | 10 | /** 11 | * A builder that writes a message in the log at various phases of the build 12 | * cycle. 13 | */ 14 | @Builder 15 | public class HelloWorldBuilder { 16 | 17 | private final static Logger LOGGER = LoggerFactory 18 | .getLogger(HelloWorldBuilder.class); 19 | 20 | @Execute(phase = Phase.GENERATE_SOURCES) 21 | public void sayHello() { 22 | LOGGER.info("Hello world from generate-sources phase!"); 23 | } 24 | 25 | @Execute(phase = Phase.INSTALL) 26 | public void sayHelloFromInstallPhase() { 27 | LOGGER.info("Hello world from install phase!"); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/build/java/test/ThymeleafPagesGenerator.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.FileNotFoundException; 6 | import java.io.IOException; 7 | import java.io.InputStream; 8 | import java.io.StringWriter; 9 | import java.nio.charset.Charset; 10 | import java.util.Locale; 11 | 12 | import org.apache.commons.io.FileUtils; 13 | import org.slf4j.Logger; 14 | import org.slf4j.LoggerFactory; 15 | import org.thymeleaf.TemplateEngine; 16 | import org.thymeleaf.TemplateProcessingParameters; 17 | import org.thymeleaf.context.Context; 18 | import org.thymeleaf.resourceresolver.IResourceResolver; 19 | import org.thymeleaf.templateresolver.TemplateResolver; 20 | 21 | import net.java.javabuild.Builder; 22 | import net.java.javabuild.BuilderFolders; 23 | import net.java.javabuild.Execute; 24 | import net.java.javabuild.Phase; 25 | 26 | /** 27 | * A builder that generates pages from the Thymeleaf pages of the project and 28 | * put them in the project site. 29 | */ 30 | @Builder 31 | public class ThymeleafPagesGenerator { 32 | 33 | private final static Logger LOGGER = LoggerFactory 34 | .getLogger(ThymeleafPagesGenerator.class); 35 | 36 | private Charset charset = Charset.forName("UTF-8"); 37 | 38 | private File siteFolder; 39 | 40 | private TemplateEngine templateEngine; 41 | 42 | @Execute(phase = Phase.PRE_SITE) 43 | public void generatePages() throws IOException { 44 | init(); 45 | generatePage("home", Locale.ENGLISH); 46 | generatePage("home", Locale.FRENCH); 47 | } 48 | 49 | private void init() { 50 | siteFolder = new File(BuilderFolders.SITE); 51 | siteFolder.mkdirs(); 52 | TemplateResolver templateResolver = new TemplateResolver(); 53 | templateResolver.setResourceResolver(new ProjectResourceResolver()); 54 | templateResolver.setSuffix(".html"); 55 | templateEngine = new TemplateEngine(); 56 | templateEngine.setTemplateResolver(templateResolver); 57 | templateEngine.initialize(); 58 | } 59 | 60 | public void generatePage(String page, Locale locale) throws IOException { 61 | LOGGER.info("Generating page " + page + " for locale " 62 | + locale.toString()); 63 | File pageFile = new File(siteFolder, page + "_" + locale.toString() 64 | + ".html"); 65 | if (pageFile.exists()) 66 | pageFile.delete(); 67 | Context context = new Context(locale); 68 | context.setVariable("variable1", "This is a variable"); 69 | StringWriter writer = new StringWriter(); 70 | templateEngine.process(page, context, writer); 71 | FileUtils.writeStringToFile(pageFile, writer.toString(), charset); 72 | } 73 | 74 | private final class ProjectResourceResolver implements IResourceResolver { 75 | File srcMainResourceFolder = new File("src/main/resources/"); 76 | 77 | @Override 78 | public InputStream getResourceAsStream( 79 | TemplateProcessingParameters templateProcessingParameters, 80 | String resourceName) { 81 | try { 82 | File file = new File(srcMainResourceFolder, resourceName); 83 | if (!file.exists()) 84 | return null; 85 | LOGGER.info("Reading: " + file.toURI()); 86 | return new FileInputStream(file); 87 | } catch (FileNotFoundException e) { 88 | return null; 89 | } 90 | } 91 | 92 | @Override 93 | public String getName() { 94 | return srcMainResourceFolder.toString(); 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/main/java/test/MyDao.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import java.sql.Connection; 4 | import java.sql.DriverManager; 5 | import java.sql.PreparedStatement; 6 | import java.sql.ResultSet; 7 | 8 | public class MyDao { 9 | public String readLine(int id) throws Exception { 10 | Class.forName("org.h2.Driver"); 11 | Connection conn = DriverManager.getConnection( 12 | "jdbc:h2:tcp://localhost/~/test", "sa", ""); 13 | PreparedStatement ps = conn 14 | .prepareStatement("SELECT * FROM MY_TABLE WHERE ID = ?;"); 15 | ps.setInt(1, id); 16 | ResultSet rs = ps.executeQuery(); 17 | rs.first(); 18 | String result = rs.getString("NAME"); 19 | conn.close(); 20 | return result; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/main/resources/home.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Page title 6 | 7 | 8 |

Welcome text

9 |

variable1

10 |

inc

11 | 12 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/main/resources/home.properties: -------------------------------------------------------------------------------- 1 | home.title=Home page 2 | home.welcome=Hello world!!!!!!! 3 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/main/resources/home_fr.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javabuild/builder-parent/fe57ba5ee750a70a174f89e7d1a37e63e475c3be/builder-maven-plugin/src/it/builder-maven-plugin-test/src/main/resources/home_fr.properties -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/main/resources/inc.html: -------------------------------------------------------------------------------- 1 | This is an include! -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/test/java/test/MyDaoTest.java: -------------------------------------------------------------------------------- 1 | package test; 2 | 3 | import org.junit.Assert; 4 | import org.junit.Test; 5 | 6 | import test.MyDao; 7 | 8 | public class MyDaoTest { 9 | 10 | @Test 11 | public void testReadLine() throws Exception { 12 | MyDao myDao = new MyDao(); 13 | String result = myDao.readLine(2); 14 | Assert.assertEquals("Hello World 2", result); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/src/test/resources/create_test_database.sql: -------------------------------------------------------------------------------- 1 | DROP ALL OBJECTS; 2 | CREATE TABLE MY_TABLE(ID INT PRIMARY KEY, NAME VARCHAR); 3 | INSERT INTO MY_TABLE VALUES(1, 'Hello World 1'); 4 | INSERT INTO MY_TABLE VALUES(2, 'Hello World 2'); 5 | INSERT INTO MY_TABLE VALUES(3, 'Hello World 3'); -------------------------------------------------------------------------------- /builder-maven-plugin/src/it/builder-maven-plugin-test/verify.bsh: -------------------------------------------------------------------------------- 1 | import java.io.*; 2 | 3 | assertFileExists (String fileName) { 4 | File file = new File(basedir, fileName); 5 | if (!file.isFile()) { 6 | throw new FileNotFoundException( "Could not find generated file: " + fileName ); 7 | } 8 | } 9 | 10 | assertFileExists("target/builder/main/java/com/example/helloworld/HelloWorld.java"); 11 | assertFileExists("target/builder/main/webapp/bootstrap/3.3.4/js/bootstrap.js"); -------------------------------------------------------------------------------- /builder-maven-plugin/src/main/java/net/java/javabuild/AddSourceMojo.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import org.apache.maven.plugin.AbstractMojo; 23 | import org.apache.maven.plugins.annotations.LifecyclePhase; 24 | import org.apache.maven.plugins.annotations.Mojo; 25 | import org.apache.maven.plugins.annotations.Parameter; 26 | import org.apache.maven.plugins.annotations.ResolutionScope; 27 | import org.apache.maven.project.MavenProject; 28 | 29 | @Mojo(name = "add-source", defaultPhase = LifecyclePhase.INITIALIZE, threadSafe = true, requiresDependencyResolution = ResolutionScope.COMPILE) 30 | public class AddSourceMojo extends AbstractMojo { 31 | 32 | @Parameter(defaultValue = "${project}", readonly = true) 33 | private MavenProject project; 34 | 35 | public void execute() { 36 | SourceFoldersUtils.addSourceFolders(project); 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /builder-maven-plugin/src/main/java/net/java/javabuild/BuildClassLoader.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | import java.io.File; 4 | import java.net.MalformedURLException; 5 | import java.net.URL; 6 | import java.net.URLClassLoader; 7 | import java.util.Iterator; 8 | import java.util.List; 9 | 10 | /** 11 | * Loads the classes first from the project test classpath, if not found from 12 | * the current build classpath except for the plugin annotation classes. 13 | * 14 | */ 15 | public class BuildClassLoader extends URLClassLoader { 16 | private final static String BUILDER_API_PACKAGE; 17 | private final static ClassLoader CLASS_LOADER = BuildClassLoader.class.getClassLoader(); 18 | static { 19 | String builderClass = Builder.class.getName(); 20 | BUILDER_API_PACKAGE = builderClass.substring(0, builderClass.lastIndexOf('.')); 21 | } 22 | 23 | public BuildClassLoader(List testClasspathElements, String classesPath) throws MalformedURLException { 24 | super(toUrlArray(testClasspathElements, classesPath)); 25 | } 26 | 27 | private static URL[] toUrlArray(List testClasspathElements, String classesPath) 28 | throws MalformedURLException { 29 | URL[] urls = new URL[testClasspathElements.size() + 1]; 30 | urls[0] = new File(classesPath).toURI().toURL(); 31 | int i = 1; 32 | for (Iterator iterator = testClasspathElements.iterator(); iterator.hasNext();) { 33 | String jar = iterator.next(); 34 | urls[i] = new File(jar).toURI().toURL(); 35 | i++; 36 | } 37 | return urls; 38 | } 39 | 40 | @Override 41 | public Class loadClass(String name) throws ClassNotFoundException { 42 | if (name.startsWith(BUILDER_API_PACKAGE)) 43 | return CLASS_LOADER.loadClass(name); 44 | else 45 | return super.loadClass(name); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/main/java/net/java/javabuild/BuildPlan.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.lang.reflect.InvocationTargetException; 23 | import java.lang.reflect.Method; 24 | import java.util.ArrayList; 25 | import java.util.HashMap; 26 | import java.util.Iterator; 27 | import java.util.List; 28 | import java.util.Map; 29 | 30 | import org.apache.maven.plugin.logging.Log; 31 | 32 | public class BuildPlan { 33 | private final Log log; 34 | 35 | public BuildPlan(Log log) { 36 | this.log = log; 37 | } 38 | 39 | private Map> phases = new HashMap>(); 40 | 41 | public void execute(Phase phase) 42 | throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { 43 | List methodInvocations = phases.get(phase); 44 | if (methodInvocations != null) { 45 | for (Iterator iterator = methodInvocations.iterator(); iterator.hasNext();) { 46 | MethodInvocation methodInvocation = iterator.next(); 47 | log.info("Invoking: " + methodInvocation.toString()); 48 | methodInvocation.execute(); 49 | } 50 | } else { 51 | log.info("Nothing to execute"); 52 | } 53 | } 54 | 55 | public void addMethodExecution(Phase phase, Object object, Method method) { 56 | List methodInvocation = phases.get(phase); 57 | if (methodInvocation == null) { 58 | methodInvocation = new ArrayList(); 59 | phases.put(phase, methodInvocation); 60 | } 61 | methodInvocation.add(new MethodInvocation(object, method)); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/main/java/net/java/javabuild/CompileMojo.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.io.File; 23 | import java.util.List; 24 | 25 | import org.apache.maven.plugin.MojoExecutionException; 26 | import org.apache.maven.plugin.compiler.CompilationFailureException; 27 | import org.apache.maven.plugin.compiler.TestCompilerMojo; 28 | import org.apache.maven.plugins.annotations.LifecyclePhase; 29 | import org.apache.maven.plugins.annotations.Mojo; 30 | import org.apache.maven.plugins.annotations.Parameter; 31 | import org.apache.maven.plugins.annotations.ResolutionScope; 32 | 33 | @Mojo(name = "compile", defaultPhase = LifecyclePhase.NONE, threadSafe = true, requiresDependencyResolution = ResolutionScope.TEST) 34 | public class CompileMojo extends TestCompilerMojo { 35 | 36 | @Parameter(defaultValue = "${project.basedir}/src/build/java", readonly = true, required = true) 37 | private List compileSourceRoots; 38 | 39 | @Parameter(defaultValue = "${project.build.directory}/build-classes", required = true, readonly = true) 40 | private File outputDirectory; 41 | 42 | @Override 43 | protected List getCompileSourceRoots() { 44 | return compileSourceRoots; 45 | } 46 | 47 | @Override 48 | protected File getOutputDirectory() { 49 | return outputDirectory; 50 | } 51 | 52 | @Override 53 | public void execute() throws MojoExecutionException, 54 | CompilationFailureException { 55 | getLog().info("Compiling build classes"); 56 | super.execute(); 57 | } 58 | 59 | } -------------------------------------------------------------------------------- /builder-maven-plugin/src/main/java/net/java/javabuild/ExecuteMojo.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.io.File; 23 | import java.io.IOException; 24 | import java.lang.reflect.InvocationTargetException; 25 | import java.lang.reflect.Method; 26 | import java.net.MalformedURLException; 27 | 28 | import org.apache.commons.io.FileUtils; 29 | import org.apache.maven.plugin.AbstractMojo; 30 | import org.apache.maven.plugin.MojoExecution; 31 | import org.apache.maven.plugin.MojoExecutionException; 32 | import org.apache.maven.plugins.annotations.InstantiationStrategy; 33 | import org.apache.maven.plugins.annotations.LifecyclePhase; 34 | import org.apache.maven.plugins.annotations.Mojo; 35 | import org.apache.maven.plugins.annotations.Parameter; 36 | import org.apache.maven.plugins.annotations.ResolutionScope; 37 | import org.apache.maven.project.MavenProject; 38 | 39 | @Mojo(name = "execute", defaultPhase = LifecyclePhase.NONE, threadSafe = true, requiresDependencyResolution = ResolutionScope.TEST, instantiationStrategy = InstantiationStrategy.KEEP_ALIVE) 40 | public class ExecuteMojo extends AbstractMojo { 41 | 42 | @Parameter(defaultValue = "${project}", readonly = true) 43 | private MavenProject project; 44 | 45 | @Parameter(defaultValue = "${project.basedir}/src/build/java", readonly = true) 46 | private String sourcePath; 47 | 48 | @Parameter(defaultValue = "${project.basedir}/target/build-classes", readonly = true) 49 | private String classesPath; 50 | 51 | @Parameter(defaultValue = "${mojoExecution}", readonly = true) 52 | private MojoExecution mojoExecution; 53 | 54 | /** 55 | * The directory where the webapp is built (used for webapps only). 56 | */ 57 | @Parameter(defaultValue = "${project.build.directory}/${project.build.finalName}", readonly = true) 58 | private File webappDirectory; 59 | 60 | /** 61 | * The directory where to copy the generated site. 62 | */ 63 | @Parameter(defaultValue = "${project.build.directory}/generated-site", readonly = true) 64 | private File generatedSiteDirectory; 65 | 66 | private BuildPlan buildPlan; 67 | 68 | private Phase currentPhase; 69 | 70 | private ClassLoader classLoader; 71 | 72 | public void execute() throws MojoExecutionException { 73 | currentPhase = Phase.fromString(mojoExecution.getLifecyclePhase()); 74 | getLog().info("Phase: " + currentPhase.toString()); 75 | if (buildPlan == null) { 76 | initClassLoader(); 77 | createBuildPlan(); 78 | } 79 | executePlanForCurrentPhase(); 80 | } 81 | 82 | private void initClassLoader() throws MojoExecutionException { 83 | try { 84 | classLoader = new BuildClassLoader(project.getTestClasspathElements(), classesPath); 85 | } catch (Exception e) { 86 | throw new MojoExecutionException("Failed to initalize project classpath", e); 87 | } 88 | } 89 | 90 | private void executePlanForCurrentPhase() throws MojoExecutionException { 91 | try { 92 | buildPlan.execute(currentPhase); 93 | if (Phase.PREPARE_PACKAGE.equals(currentPhase)) 94 | afterPreparePackage(); 95 | else if (Phase.PRE_SITE.equals(currentPhase)) 96 | afterPreSite(); 97 | } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | IOException e) { 98 | throw new MojoExecutionException("Failed to execute build classes for phase " + currentPhase, e); 99 | } 100 | 101 | } 102 | 103 | private void afterPreparePackage() throws IOException { 104 | File webappResources = new File(BuilderFolders.WEBAPP_RESOURCES); 105 | if (webappResources.exists()) 106 | FileUtils.copyDirectory(webappResources, webappDirectory); 107 | } 108 | 109 | private void afterPreSite() throws IOException { 110 | File site = new File(BuilderFolders.SITE); 111 | if (site.exists()) 112 | FileUtils.copyDirectory(site, new File(generatedSiteDirectory, "resources/")); 113 | } 114 | 115 | private void createBuildPlan() throws MojoExecutionException { 116 | buildPlan = new BuildPlan(getLog()); 117 | getLog().info("Looking for build classes"); 118 | File sourceFolder = new File(sourcePath); 119 | if (sourceFolder.exists()) 120 | try { 121 | findBuildClasses("", sourceFolder); 122 | } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException 123 | | IllegalAccessException | IllegalArgumentException | InvocationTargetException | IOException e) { 124 | throw new MojoExecutionException("Failed to load build classes", e); 125 | } 126 | else 127 | getLog().info("Build source folder " + sourcePath + " does not exist"); 128 | } 129 | 130 | private void findBuildClasses(String parent, File folder) 131 | throws ClassNotFoundException, NoSuchMethodException, SecurityException, InstantiationException, 132 | IllegalAccessException, IllegalArgumentException, InvocationTargetException, IOException { 133 | File[] files = folder.listFiles(); 134 | for (int i = 0; i < files.length; i++) { 135 | File file = files[i]; 136 | if (file.isDirectory()) { 137 | if (!"".equals(parent)) 138 | parent = parent + "."; 139 | parent = parent + file.getName(); 140 | findBuildClasses(parent, file); 141 | } else { 142 | String className = parent; 143 | if (!"".equals(className)) 144 | className = className + "."; 145 | className = className + file.getName(); 146 | if (className.endsWith(".java")) 147 | className = className.substring(0, className.length() - 5); 148 | processClass(className); 149 | } 150 | } 151 | } 152 | 153 | private void processClass(String className) throws MalformedURLException, ClassNotFoundException, 154 | InstantiationException, IllegalAccessException, InvocationTargetException, IOException { 155 | Class theClass = classLoader.loadClass(className); 156 | if (theClass.isAnnotationPresent(Builder.class)) { 157 | Object instance = theClass.newInstance(); 158 | Method[] methods = theClass.getDeclaredMethods(); 159 | for (int j = 0; j < methods.length; j++) { 160 | Method method = methods[j]; 161 | Execute execute = method.getAnnotation(Execute.class); 162 | if (execute != null) { 163 | buildPlan.addMethodExecution(execute.phase(), instance, method); 164 | } 165 | } 166 | } 167 | } 168 | } -------------------------------------------------------------------------------- /builder-maven-plugin/src/main/java/net/java/javabuild/MavenBuilderExtension.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | import java.io.IOException; 4 | import java.util.Properties; 5 | 6 | /* 7 | * Licensed to the Apache Software Foundation (ASF) under one 8 | * or more contributor license agreements. See the NOTICE file 9 | * distributed with this work for additional information 10 | * regarding copyright ownership. The ASF licenses this file 11 | * to you under the Apache License, Version 2.0 (the 12 | * "License"); you may not use this file except in compliance 13 | * with the License. You may obtain a copy of the License at 14 | * 15 | * http://www.apache.org/licenses/LICENSE-2.0 16 | * 17 | * Unless required by applicable law or agreed to in writing, 18 | * software distributed under the License is distributed on an 19 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 20 | * KIND, either express or implied. See the License for the 21 | * specific language governing permissions and limitations 22 | * under the License. 23 | */ 24 | 25 | import org.apache.maven.AbstractMavenLifecycleParticipant; 26 | import org.apache.maven.MavenExecutionException; 27 | import org.apache.maven.execution.MavenSession; 28 | import org.apache.maven.model.Plugin; 29 | import org.apache.maven.model.PluginExecution; 30 | import org.apache.maven.project.MavenProject; 31 | import org.codehaus.plexus.component.annotations.Component; 32 | import org.codehaus.plexus.component.annotations.Requirement; 33 | import org.slf4j.Logger; 34 | 35 | @Component(role = AbstractMavenLifecycleParticipant.class) 36 | public class MavenBuilderExtension extends AbstractMavenLifecycleParticipant { 37 | @Requirement 38 | private Logger logger; 39 | 40 | @Override 41 | public void afterProjectsRead(MavenSession session) throws MavenExecutionException { 42 | MavenProject project = session.getCurrentProject(); 43 | SourceFoldersUtils.addSourceFolders(project); 44 | addPluginExecutions(project); 45 | logger.info("Maven builder extension initialized"); 46 | } 47 | 48 | private void addPluginExecutions(MavenProject project) throws MavenExecutionException { 49 | Properties properties = new Properties(); 50 | try { 51 | properties.load(this.getClass().getResourceAsStream("version.properties")); 52 | } catch (IOException e) { 53 | throw new MavenExecutionException("Could not read plugin properties", e); 54 | } 55 | Plugin plugin = new Plugin(); 56 | plugin.setGroupId(properties.getProperty("groupId")); 57 | plugin.setArtifactId(properties.getProperty("artifactId")); 58 | plugin.setVersion(properties.getProperty("version")); 59 | addPluginExecution(plugin, "compile", Phase.GENERATE_SOURCES); 60 | addPluginExecution(plugin, "compile", Phase.PRE_SITE); 61 | Phase[] lifecyclePhases = Phase.values(); 62 | for (int i = 0; i < lifecyclePhases.length; i++) { 63 | addPluginExecution(plugin, "execute", lifecyclePhases[i]); 64 | } 65 | project.getBuild().addPlugin(plugin); 66 | } 67 | 68 | private void addPluginExecution(Plugin plugin, String goal, Phase phase) { 69 | PluginExecution pluginExecution = new PluginExecution(); 70 | pluginExecution.addGoal(goal); 71 | pluginExecution.setPhase(phase.toString()); 72 | plugin.addExecution(pluginExecution); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/main/java/net/java/javabuild/MethodInvocation.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.lang.reflect.InvocationTargetException; 23 | import java.lang.reflect.Method; 24 | 25 | public class MethodInvocation { 26 | private final Object object; 27 | private final Method method; 28 | 29 | public MethodInvocation(Object object, Method method) { 30 | this.object = object; 31 | this.method = method; 32 | } 33 | 34 | public void execute() throws IllegalAccessException, 35 | IllegalArgumentException, InvocationTargetException { 36 | method.invoke(object); 37 | } 38 | 39 | @Override 40 | public String toString() { 41 | return object.getClass().getName() + "." + method.getName() + "()"; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/main/java/net/java/javabuild/SourceFoldersUtils.java: -------------------------------------------------------------------------------- 1 | package net.java.javabuild; 2 | 3 | /* 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | import java.io.File; 23 | 24 | import org.apache.maven.model.Resource; 25 | import org.apache.maven.project.MavenProject; 26 | 27 | import net.java.javabuild.BuilderFolders; 28 | 29 | public class SourceFoldersUtils { 30 | 31 | public static void addSourceFolders(MavenProject project) { 32 | project.addTestCompileSourceRoot(BuilderFolders.BUILD_SOURCES); 33 | project.addTestResource(toResource(BuilderFolders.BUILD_RESOURCES, 34 | project)); 35 | project.addCompileSourceRoot(BuilderFolders.GENERATED_SOURCES); 36 | project.addResource(toResource(BuilderFolders.GENERATED_RESOURCES, 37 | project)); 38 | project.addTestCompileSourceRoot(BuilderFolders.GENERATED_TEST_SOURCES); 39 | project.addTestResource(toResource( 40 | BuilderFolders.GENERATED_TEST_RESOURCES, project)); 41 | } 42 | 43 | private static Resource toResource(String folderString, MavenProject project) { 44 | File folder = new File(project.getBasedir(), folderString); 45 | Resource resource = new Resource(); 46 | resource.setDirectory(folder.getAbsolutePath()); 47 | return resource; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | add-source 25 | 26 | 27 | 28 | 29 | true 30 | true 31 | 32 | 33 | 34 | 35 | 36 | 37 | compile 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | execute 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/main/resources/net/java/javabuild/version.properties: -------------------------------------------------------------------------------- 1 | groupId=${project.groupId} 2 | artifactId=${project.artifactId} 3 | version=${project.version} 4 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/site/markdown/index.md: -------------------------------------------------------------------------------- 1 | ## A maven plugin to use custom java code inside your maven build 2 | 3 | With this plugin, you can put some java code in a source folder "src/build/java". The code will be executed during the maven build. Use annotations to bind the build classes to the maven lifecycle phases. 4 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/site/markdown/usage.md: -------------------------------------------------------------------------------- 1 | ## Usage 2 | 3 | The plugin requires minimum maven 3.1 4 | 5 | To use the plugin in your project: 6 | 7 | 1. declare the plugin in the project's pom.xml 8 | 1. add dependency to builder-api with "test" scope 9 | 1. create a folder "src/build/java" 10 | 1. create classes and use the annotations 11 | 12 | ```xml 13 | 14 | 15 | 16 | net.java.javabuild 17 | builder-maven-plugin 18 | 1.1 19 | true 20 | 21 | 22 | 23 | add-source 24 | 25 | add-source 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | net.java.javabuild 35 | builder-api 36 | 1.1 37 | 38 | ``` 39 | 40 | ```java 41 | @Builder 42 | public class MyCustomBuilder { 43 | 44 | private final static Logger LOGGER = LoggerFactory 45 | .getLogger(MyCustomBuilder.class); 46 | 47 | @Execute(phase = Phase.GENERATE_SOURCES) 48 | public void sayHello() { 49 | LOGGER.info("Hello world"); 50 | } 51 | ``` 52 | 53 | ## Conventions 54 | 55 | In your build classes, you can generate java sources, test sources, resources, add files to a webapp (for war projects) and add pages to the project's site. You just have to place the files in the following folders: 56 | 57 | * build classes: "src/build/java/" 58 | * build resources: "src/build/resources/" 59 | * generated sources: "target/builder/main/java/" 60 | * generated resources: "target/builder/main/resources/" 61 | * generated test sources: "target/builder/test/java/" 62 | * generated test resources: "target/builder/test/resources/" 63 | * additional files to include in the war file (for war projects): "target/builder/main/webapp/" 64 | * additional html pages to deploy in the project's site: "target/builder/site/" 65 | 66 | For examples, look at project "builder-maven-plugin-test". 67 | -------------------------------------------------------------------------------- /builder-maven-plugin/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 17 | 18 | 19 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | net.java.javabuild 5 | builder-parent 6 | 1.2-SNAPSHOT 7 | pom 8 | https://javabuild.github.io/ 9 | A set of tools including a maven plugin to execute custom java code during the project build. 10 | 11 | 12 | Apache Software License 13 | http://www.apache.org/licenses/LICENSE-2.0.txt 14 | 15 | 16 | 17 | GitHub 18 | https://github.com/javabuild/builder-parent/issues 19 | 20 | 21 | 22 | fxbonnet 23 | Francois-Xavier Bonnet 24 | francois-xavier.bonnet@centraliens.net 25 | 26 | 27 | 28 | scm:git:https://github.com/javabuild/builder-parent.git 29 | scm:git:https://github.com/javabuild/builder-parent.git 30 | https://github.com/javabuild/builder-parent 31 | HEAD 32 | 33 | 34 | 35 | ossrh 36 | https://oss.sonatype.org/content/repositories/snapshots 37 | 38 | 39 | ossrh 40 | https://oss.sonatype.org/service/local/staging/deploy/maven2/ 41 | 42 | 43 | 44 | UTF-8 45 | 1.7 46 | 1.7 47 | 48 | 49 | 50 | junit 51 | junit 52 | 4.12 53 | test 54 | 55 | 56 | 57 | 58 | 59 | com.github.github 60 | site-maven-plugin 61 | 0.12 62 | 63 | 64 | 65 | site 66 | 67 | site 68 | 69 | Uploading site to github.io 70 | github 71 | javabuild.github.io 72 | javabuild 73 | true 74 | refs/heads/master 75 | 76 | 77 | 78 | 79 | 80 | org.apache.maven.plugins 81 | maven-source-plugin 82 | 3.0.1 83 | 84 | 85 | attach-sources 86 | 87 | jar-no-fork 88 | 89 | 90 | 91 | 92 | 93 | org.apache.maven.plugins 94 | maven-javadoc-plugin 95 | 2.10.4 96 | 97 | 98 | attach-javadocs 99 | 100 | jar 101 | 102 | 103 | 104 | 105 | 106 | org.apache.maven.plugins 107 | maven-gpg-plugin 108 | 1.6 109 | 110 | 111 | sign-artifacts 112 | verify 113 | 114 | sign 115 | 116 | 117 | 118 | 119 | 120 | org.apache.maven.plugins 121 | maven-release-plugin 122 | 2.5.3 123 | 124 | 125 | 126 | 127 | org.apache.maven.wagon 128 | wagon-ssh 129 | 2.10 130 | 131 | 132 | 133 | 134 | 135 | 136 | org.apache.maven.plugins 137 | maven-site-plugin 138 | 3.6 139 | 140 | 141 | org.apache.maven.plugins 142 | maven-project-info-reports-plugin 143 | 2.9 144 | 145 | 146 | 147 | 148 | builder-api 149 | builder-maven-plugin 150 | 151 | builder-parent 152 | -------------------------------------------------------------------------------- /src/site/markdown/index.md: -------------------------------------------------------------------------------- 1 | ## A Maven plugin to power up your Maven builds with custom java code 2 | 3 | Maven offers a lot of standard plugins that let you write fully automated and reliable builds. You can even develop your own plugins if you have some specific needs. But it can be complicated to make a separate project for your custom plugin with a separate release lifecycle. Wouldn't it be easier if you could just put your build code directly inside the project? 4 | 5 | **builder-maven-plugin** adds a **src/build/java** folder on your project 6 | 7 | ![Source structure](images/ScreenShot001.png "Source structure") 8 | 9 | Then you just write java classes with a few **annotations** in order to bind them to standard maven lifecycle. 10 | 11 | ![Source example](images/ScreenShot002.png "Source example") 12 | 13 | Fork me on GitHub 14 | 15 | In the end, you will still have a **pom.xml** file with the essential informations of the project (dependencies, scm...) but for all the more custom tasks, no more need to use a complex and poorly documented maven plugin, no more need for maven-antrun-plugin, you just code java in the project. This is only some examples of What you can do : 16 | 17 | * generate java classes 18 | * scan the project for some annotations and do some stuff (at build time, not at runtime like with Spring!) 19 | * generate documentation pages 20 | * start an embedded database before launching your unit tests 21 | * use any of the many libraries that can make cool stuff but don't have a maven plugin 22 | * anything else you cannot do with an existing maven plugin 23 | * ... 24 | 25 | ### Where to start? 26 | 27 | * see the usage page of the maven plugin for how to use the plugin 28 | * see the example project on Github for examples on how to use it 29 | 30 | -------------------------------------------------------------------------------- /src/site/resources/images/ScreenShot001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javabuild/builder-parent/fe57ba5ee750a70a174f89e7d1a37e63e475c3be/src/site/resources/images/ScreenShot001.png -------------------------------------------------------------------------------- /src/site/resources/images/ScreenShot002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javabuild/builder-parent/fe57ba5ee750a70a174f89e7d1a37e63e475c3be/src/site/resources/images/ScreenShot002.png -------------------------------------------------------------------------------- /src/site/site.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 26 | javabuild 27 | UA-72904650-2 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | --------------------------------------------------------------------------------