diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 558a16b1..3aef2840 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -55,7 +55,7 @@ jobs: $JBOSS_HOME/bin/standalone.sh & until `$JBOSS_HOME/bin/jboss-cli.sh -c ":read-attribute(name=server-state)" 2> /dev/null | grep -q running`; do sleep 1 - done + done ./runtest_remote.sh $ARCHETYPE_VERSION $JBOSS_HOME/bin/jboss-cli.sh --connect command=:shutdown echo " * :white_check_mark: Remote Tests" >> $GITHUB_STEP_SUMMARY @@ -89,4 +89,3 @@ jobs: rm -rf wildfly-jakartaee-webapp-archetype/testing/arq-remote rm -rf wildfly-jakartaee-webapp-archetype/testing/arq-managed rm -rf wildfly-subsystem-archetype/testing/example-subsystem - \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 10b39a9a..189ef73f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ Archetype is a Maven project templating toolkit Basic Steps ----------- -To contribute to the Archetypes, fork the Archetypes repository to your own Git, clone your fork, commit your work on topic branches, and make pull requests. +To contribute to the Archetypes, fork the Archetypes repository to your own Git, clone your fork, commit your work on topic branches, and make pull requests. If you don't have the Git client (`git`), get it from: @@ -58,7 +58,7 @@ Here are the steps in detail: 9. Push your local topic branch to your github forked repository. This will create a branch on your Git fork repository with the same name as your local topic branch name. - git push origin HEAD + git push origin HEAD 10. Browse to the branch on your forked Git repository and [open a Pull Request](http://help.github.com/send-pull-requests/). Give it a clear title and description. @@ -70,7 +70,7 @@ General Guidelines License Information and Contributor Agreement --------------------------------------------- - JBoss Developer Framework is licensed under the Apache License 2.0, as we believe it is one of the most permissive Open Source license. This allows developers to easily make use of the code samples in JBoss Developer Framework. + JBoss Developer Framework is licensed under the Apache License 2.0, as we believe it is one of the most permissive Open Source license. This allows developers to easily make use of the code samples in JBoss Developer Framework. There is no need to sign a contributor agreement to contribute to JBoss Developer Framework. You just need to explicitly license any contribution under the AL 2.0. If you add any new files to JBoss Developer Framework, make sure to add the correct header. @@ -79,7 +79,7 @@ License Information and Contributor Agreement /* * JBoss, Home of Professional Open Source * Copyright , Red Hat, Inc. and/or its affiliates, and individual - * contributors by the @authors tag. See the copyright.txt in the + * contributors by the @authors tag. See the copyright.txt in the * distribution for a full listing of individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -87,7 +87,7 @@ License Information and Contributor Agreement * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, + * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. @@ -98,7 +98,7 @@ License Information and Contributor Agreement diff --git a/wildfly-getting-started-archetype/README.adoc b/wildfly-getting-started-archetype/README.adoc index 4c5d1406..7b5df316 100644 --- a/wildfly-getting-started-archetype/README.adoc +++ b/wildfly-getting-started-archetype/README.adoc @@ -10,7 +10,7 @@ service and a HTML page to call the web service. The generated project is configured to dynamically provision a WildFly server and run the web application on the provisoned server so no manual installation is required. - + It is prepared for running Arquillian unit tests. More details can be found in the file "src/main/resources/archetype-resources/README.txt", which is end-user doc and added to the resulting project. diff --git a/wildfly-getting-started-archetype/src/main/resources-filtered/archetype-resources/pom.xml b/wildfly-getting-started-archetype/src/main/resources-filtered/archetype-resources/pom.xml index fa6dbae5..814e3155 100644 --- a/wildfly-getting-started-archetype/src/main/resources-filtered/archetype-resources/pom.xml +++ b/wildfly-getting-started-archetype/src/main/resources-filtered/archetype-resources/pom.xml @@ -28,9 +28,9 @@ Insert description for your project here. - - UTF-8 @@ -78,8 +78,8 @@ diff --git a/wildfly-getting-started-archetype/src/main/resources/archetype-resources/README.adoc b/wildfly-getting-started-archetype/src/main/resources/archetype-resources/README.adoc index 690817d1..e4e2d09e 100644 --- a/wildfly-getting-started-archetype/src/main/resources/archetype-resources/README.adoc +++ b/wildfly-getting-started-archetype/src/main/resources/archetype-resources/README.adoc @@ -4,7 +4,7 @@ = ${artifactId} -The `${artifactId}` project is a simple Jakarta EE application with a HTTP endpoint that is running in +The `${artifactId}` project is a simple Jakarta EE application with a HTTP endpoint that is running in https://wildfly.org[WildFly]. The `src/main` folder contains a simple 'Hello world' style Jakarta EE application using JAX-RS. diff --git a/wildfly-getting-started-archetype/src/main/resources/archetype-resources/src/main/java/__defaultClassPrefix__Endpoint.java b/wildfly-getting-started-archetype/src/main/resources/archetype-resources/src/main/java/__defaultClassPrefix__Endpoint.java index 84893d3c..4f5d8187 100644 --- a/wildfly-getting-started-archetype/src/main/resources/archetype-resources/src/main/java/__defaultClassPrefix__Endpoint.java +++ b/wildfly-getting-started-archetype/src/main/resources/archetype-resources/src/main/java/__defaultClassPrefix__Endpoint.java @@ -14,15 +14,15 @@ @Path("/") public class ${defaultClassPrefix}Endpoint { - @Inject - private ${defaultClassPrefix}Service service; + @Inject + private ${defaultClassPrefix}Service service; - @GET - @Path("/{name}") - @Produces(MediaType.TEXT_PLAIN) - public Response sayHello(final @PathParam("name") String name) { - String response = service.hello(name); - - return Response.ok(response).build(); - } + @GET + @Path("/{name}") + @Produces(MediaType.TEXT_PLAIN) + public Response sayHello(final @PathParam("name") String name) { + String response = service.hello(name); + + return Response.ok(response).build(); + } } diff --git a/wildfly-getting-started-archetype/src/main/resources/archetype-resources/src/main/webapp/index.html b/wildfly-getting-started-archetype/src/main/resources/archetype-resources/src/main/webapp/index.html index 9bf724cc..91a1c504 100644 --- a/wildfly-getting-started-archetype/src/main/resources/archetype-resources/src/main/webapp/index.html +++ b/wildfly-getting-started-archetype/src/main/resources/archetype-resources/src/main/webapp/index.html @@ -75,7 +75,7 @@

Getting Started

-

This page is served by your application. The source is in src/main/webapp/index.html.

+

This page is served by your application. The source is in src/main/webapp/index.html.

diff --git a/wildfly-jakartaee-ear-archetype/README.adoc b/wildfly-jakartaee-ear-archetype/README.adoc index 156cea37..a00c83bc 100644 --- a/wildfly-jakartaee-ear-archetype/README.adoc +++ b/wildfly-jakartaee-ear-archetype/README.adoc @@ -4,7 +4,7 @@ WildFly archetype for blank EAR project [[introduction]] ==== Introduction -This archetype creates a blank EAR project with EJB and Web module. +This archetype creates a blank EAR project with EJB and Web module. It is prepared for running Arquillian unit tests. More details can be found in the file "src/main/resources/archetype-resources/README.txt", which is end-user doc and added to the resulting project. diff --git a/wildfly-jakartaee-ear-archetype/pom.xml b/wildfly-jakartaee-ear-archetype/pom.xml index c25855bc..3fb93a48 100644 --- a/wildfly-jakartaee-ear-archetype/pom.xml +++ b/wildfly-jakartaee-ear-archetype/pom.xml @@ -15,7 +15,7 @@ 30.0.1.Final-SNAPSHOT ../pom.xml - + wildfly-jakartaee-ear-archetype maven-archetype diff --git a/wildfly-jakartaee-ear-archetype/src/main/resources-filtered/archetype-resources/pom.xml b/wildfly-jakartaee-ear-archetype/src/main/resources-filtered/archetype-resources/pom.xml index 4d453bea..bc9c1178 100644 --- a/wildfly-jakartaee-ear-archetype/src/main/resources-filtered/archetype-resources/pom.xml +++ b/wildfly-jakartaee-ear-archetype/src/main/resources-filtered/archetype-resources/pom.xml @@ -21,7 +21,7 @@ \${groupId} \${rootArtifactId} \${version} - + pom \${rootArtifactId} Insert description for your project here. @@ -33,9 +33,9 @@ - - UTF-8 @@ -109,10 +109,10 @@ war compile
- + @@ -136,7 +136,7 @@ - @@ -159,7 +159,7 @@ true - + diff --git a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/README.txt b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/README.txt index 112a7649..8aae196b 100644 --- a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/README.txt +++ b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/README.txt @@ -30,17 +30,17 @@ The configuration can be found in "${rootArtifactId}/pom.xml": Three profiles are defined: -"default": no integration tests are executed. --"arq-remote": you have to start a WildFly server on your machine. The tests are executed by deploying +-"arq-remote": you have to start a WildFly server on your machine. The tests are executed by deploying the application to this server. Here the "maven-failsafe-plugin" is enabled so that integration tests can be run. Run maven with these arguments: "clean verify -Parq-remote" --"arq-managed": this requires the environment variable "JBOSS_HOME" to be set: +-"arq-managed": this requires the environment variable "JBOSS_HOME" to be set: The server found in this path is started and the tests are executed by deploying the application to this server. Instead of using this environment variable, you can also define the path in "arquillian.xml". Here the "maven-failsafe-plugin" is enabled so that integration tests can be run. Run maven with these arguments: "clean verify -Parq-managed" -The Arquillian test runner is configured with the file "src/test/resources/arquillian.xml" +The Arquillian test runner is configured with the file "src/test/resources/arquillian.xml" (duplicated in EJB and WEB project, depending where your tests are placed). The profile "arq-remote" uses the container qualifier "remote" in this file. The profile "arq-managed" uses the container qualifier "managed" in this file. @@ -53,7 +53,7 @@ You can delete this test file if no tests are necessary. Why integration tests instead of the "maven-surefire-plugin" testrunner? The Arquillian test runner deploys the EAR file to the WildFly server and thus you have to build it yourself with the ShrinkWrap API. -The goal "verify" (which triggers the maven-surefire-plugin) is executed later in the maven build lifecyle than the "test" goal so that the target +The goal "verify" (which triggers the maven-surefire-plugin) is executed later in the maven build lifecyle than the "test" goal so that the target artifacts ("${rootArtifactId}-ejb.jar" and "${rootArtifactId}-web.war") are already built. You can build the final EAR by including those files. The "maven-surefire-plugin" is executed before the JAR/WAR files -are created, so those JAR/WAR files would have to be built in the "@Deployment" method, too. +are created, so those JAR/WAR files would have to be built in the "@Deployment" method, too. diff --git a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/ear/pom.xml b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/ear/pom.xml index e22e58b1..41201fc5 100644 --- a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/ear/pom.xml +++ b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/ear/pom.xml @@ -46,7 +46,7 @@ ${project.parent.artifactId} - + org.apache.maven.plugins maven-ear-plugin diff --git a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/ejb/pom.xml b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/ejb/pom.xml index d6590985..86006db0 100644 --- a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/ejb/pom.xml +++ b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/ejb/pom.xml @@ -44,8 +44,8 @@ test - org.hibernate.validator @@ -91,13 +91,13 @@
- + ${project.artifactId} - - - + + + org.apache.maven.plugins maven-ejb-plugin ${version.ejb.plugin} diff --git a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/ejb/src/test/resources/arquillian.xml b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/ejb/src/test/resources/arquillian.xml index 15a66d12..b547af1c 100644 --- a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/ejb/src/test/resources/arquillian.xml +++ b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/ejb/src/test/resources/arquillian.xml @@ -36,7 +36,7 @@ EAP_HOME --> - + diff --git a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/web/pom.xml b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/web/pom.xml index b95c3f88..9851b907 100644 --- a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/web/pom.xml +++ b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/web/pom.xml @@ -37,8 +37,8 @@ provided - org.hibernate.validator @@ -94,40 +94,40 @@ jakarta.annotation-api provided - + junit junit test - + - org.jboss.arquillian.junit arquillian-junit-container test - + - - ${project.artifactId} + + ${project.artifactId} - - - maven-war-plugin - ${version.war.plugin} - - - false - - + + + maven-war-plugin + ${version.war.plugin} + + + false + + diff --git a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/web/src/test/java/test/SampleIT.java b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/web/src/test/java/test/SampleIT.java index f38cacbd..48d3be8a 100644 --- a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/web/src/test/java/test/SampleIT.java +++ b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/web/src/test/java/test/SampleIT.java @@ -15,7 +15,7 @@ /** * Sample integration test: demonstrates how to create the EAR file using the ShrinkWrap API. - * + * * Delete this file if no integration test is required. */ @RunWith(Arquillian.class) @@ -23,7 +23,7 @@ public class SampleIT { /** * Creates the EAR file that is deployed to the server. - * + * * @return EAR archive */ @Deployment @@ -59,7 +59,7 @@ public static Archive getEarArchive() { /** * A sample test... - * + * */ @Test public void test() { diff --git a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/web/src/test/resources/arquillian.xml b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/web/src/test/resources/arquillian.xml index 573eb450..984d4c04 100644 --- a/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/web/src/test/resources/arquillian.xml +++ b/wildfly-jakartaee-ear-archetype/src/main/resources/archetype-resources/web/src/test/resources/arquillian.xml @@ -36,7 +36,7 @@ EAP_HOME --> - + diff --git a/wildfly-jakartaee-ear-archetype/testing/additionalfiles/ArchetypeIT.java b/wildfly-jakartaee-ear-archetype/testing/additionalfiles/ArchetypeIT.java index 0af16661..04ec9e3f 100644 --- a/wildfly-jakartaee-ear-archetype/testing/additionalfiles/ArchetypeIT.java +++ b/wildfly-jakartaee-ear-archetype/testing/additionalfiles/ArchetypeIT.java @@ -16,10 +16,10 @@ public class ArchetypeIT extends SampleIT{ @EJB private TestLocal testLocal; - + /** * A sample test... - * + * */ @Test public void test() { @@ -27,7 +27,7 @@ public void test() { System.out.println("================================================="); System.out.println("Test is invoked..."); System.out.println("================================================="); - + this.testLocal.doTest ("test"); } } diff --git a/wildfly-jakartaee-ear-archetype/testing/additionalfiles/TestBean.java b/wildfly-jakartaee-ear-archetype/testing/additionalfiles/TestBean.java index a2a95748..970179f4 100644 --- a/wildfly-jakartaee-ear-archetype/testing/additionalfiles/TestBean.java +++ b/wildfly-jakartaee-ear-archetype/testing/additionalfiles/TestBean.java @@ -4,7 +4,7 @@ /** * This bean is invoked by the Arquillian unit test. - * + * */ @Stateless() public class TestBean implements TestRemote, TestLocal @@ -18,16 +18,16 @@ public TestBean() /** * This method is invoked by the Arquillian unit test. - * + * * @param test Some test string * @return value of parameter "test" */ public String doTest(String test) { System.out.println("================================================="); - System.out.println("doTest is invoked with parameter 'test' = " + test); + System.out.println("doTest is invoked with parameter 'test' = " + test); System.out.println("================================================="); - + return test; } } diff --git a/wildfly-jakartaee-ear-archetype/testing/additionalfiles/TestLocal.java b/wildfly-jakartaee-ear-archetype/testing/additionalfiles/TestLocal.java index f91319a8..9edd2da3 100644 --- a/wildfly-jakartaee-ear-archetype/testing/additionalfiles/TestLocal.java +++ b/wildfly-jakartaee-ear-archetype/testing/additionalfiles/TestLocal.java @@ -3,14 +3,14 @@ /** * Local interface of the Arquillian unit test bean. - * + * */ @Local public interface TestLocal { /** * This method is invoked by the Arquillian unit test. - * + * * @param test Some test string * @return value of parameter "test" */ diff --git a/wildfly-jakartaee-ear-archetype/testing/additionalfiles/TestRemote.java b/wildfly-jakartaee-ear-archetype/testing/additionalfiles/TestRemote.java index 08771c68..86fe7983 100644 --- a/wildfly-jakartaee-ear-archetype/testing/additionalfiles/TestRemote.java +++ b/wildfly-jakartaee-ear-archetype/testing/additionalfiles/TestRemote.java @@ -3,14 +3,14 @@ /** * Remote interface of the Arquillian unit test bean. - * + * */ @Remote public interface TestRemote { /** * This method is invoked by the Arquillian unit test. - * + * * @param test Some test string * @return value of parameter "test" */ diff --git a/wildfly-jakartaee-ear-archetype/testing/runtest_managed.bat b/wildfly-jakartaee-ear-archetype/testing/runtest_managed.bat index 94b64c41..e880aaab 100644 --- a/wildfly-jakartaee-ear-archetype/testing/runtest_managed.bat +++ b/wildfly-jakartaee-ear-archetype/testing/runtest_managed.bat @@ -1,13 +1,13 @@ @REM Creates a project from the archetype, copies some additional source files and runs an integration test @REM using the profile "arq-managed". @REM Prerequesites: the environment variable JBOSS_HOME must point to the WildFly server corresponding to the archetyp version. -@REM The current archetype version must be the first argument to the batch file call. +@REM The current archetype version must be the first argument to the batch file call. @echo off @if "%1" == "" ( echo Archetype version must be first argument to the call to the batch file. - set /p archetypeVersion=Please enter archetype version: + set /p archetypeVersion=Please enter archetype version: ) else ( set archetypeVersion=%1 ) diff --git a/wildfly-jakartaee-ear-archetype/testing/runtest_managed.sh b/wildfly-jakartaee-ear-archetype/testing/runtest_managed.sh index 0a828895..2250acc8 100755 --- a/wildfly-jakartaee-ear-archetype/testing/runtest_managed.sh +++ b/wildfly-jakartaee-ear-archetype/testing/runtest_managed.sh @@ -2,7 +2,7 @@ # Creates a project from the archetype, copies some additional source files and runs an integration test # using the profile "arq-managed". # Prerequesites: the environment variable JBOSS_HOME must point to the WildFly server corresponding to the archetyp version. -# The current archetype version must be the first argument to the batch file call. +# The current archetype version must be the first argument to the batch file call. if [ -z "$1" ] then diff --git a/wildfly-jakartaee-ear-archetype/testing/runtest_remote.bat b/wildfly-jakartaee-ear-archetype/testing/runtest_remote.bat index 2ff67c77..f752fd29 100644 --- a/wildfly-jakartaee-ear-archetype/testing/runtest_remote.bat +++ b/wildfly-jakartaee-ear-archetype/testing/runtest_remote.bat @@ -1,13 +1,13 @@ @REM Creates a project from the archetype, copies some additional source files and runs an integration test @REM using the profile "arq-remote". @REM Prerequesites: a WildFly server corresponding to the archetyp version must be running on localhost. -@REM The current archetype version must be the first argument to the batch file call. +@REM The current archetype version must be the first argument to the batch file call. @echo off @if "%1" == "" ( echo Archetype version must be first argument to the call to the batch file. - set /p archetypeVersion=Please enter archetype version: + set /p archetypeVersion=Please enter archetype version: ) else ( set archetypeVersion=%1 ) diff --git a/wildfly-jakartaee-ear-archetype/testing/runtest_remote.sh b/wildfly-jakartaee-ear-archetype/testing/runtest_remote.sh index d87c4f72..d8c000c1 100755 --- a/wildfly-jakartaee-ear-archetype/testing/runtest_remote.sh +++ b/wildfly-jakartaee-ear-archetype/testing/runtest_remote.sh @@ -2,7 +2,7 @@ # Creates a project from the archetype, copies some additional source files and runs an integration test # using the profile "arq-remote". # Prerequesites: a WildFly server corresponding to the archetyp version must be running on localhost. -# The current archetype version must be the first argument to the batch file call. +# The current archetype version must be the first argument to the batch file call. if [ -z "$1" ] then diff --git a/wildfly-jakartaee-webapp-archetype/README.adoc b/wildfly-jakartaee-webapp-archetype/README.adoc index ce9c5496..eecf18fe 100644 --- a/wildfly-jakartaee-webapp-archetype/README.adoc +++ b/wildfly-jakartaee-webapp-archetype/README.adoc @@ -4,7 +4,7 @@ WildFly archetype for blank WAR project [[introduction]] ==== Introduction -This archetype creates a blank WAR project. +This archetype creates a blank WAR project. It is prepared for running Arquillian unit tests. More details can be found in the file "src/main/resources/archetype-resources/README.txt", which is end-user doc and added to the resulting project. diff --git a/wildfly-jakartaee-webapp-archetype/pom.xml b/wildfly-jakartaee-webapp-archetype/pom.xml index ce8295fa..e55bf1ff 100644 --- a/wildfly-jakartaee-webapp-archetype/pom.xml +++ b/wildfly-jakartaee-webapp-archetype/pom.xml @@ -14,7 +14,7 @@ wildfly-archetypes 30.0.1.Final-SNAPSHOT ../pom.xml - + wildfly-jakartaee-webapp-archetype maven-archetype diff --git a/wildfly-jakartaee-webapp-archetype/src/main/resources-filtered/archetype-resources/pom.xml b/wildfly-jakartaee-webapp-archetype/src/main/resources-filtered/archetype-resources/pom.xml index ad820ccb..1a60a3ca 100644 --- a/wildfly-jakartaee-webapp-archetype/src/main/resources-filtered/archetype-resources/pom.xml +++ b/wildfly-jakartaee-webapp-archetype/src/main/resources-filtered/archetype-resources/pom.xml @@ -21,15 +21,15 @@ \${groupId} \${rootArtifactId} \${version} - + war \${rootArtifactId} Insert description for your project here. - - UTF-8 @@ -83,8 +83,8 @@ @@ -97,7 +97,7 @@ - + @@ -107,8 +107,8 @@ provided - org.hibernate.validator @@ -156,29 +156,29 @@ jakarta.annotation-api provided - + junit junit test - + - org.jboss.arquillian.junit arquillian-junit-container test - + - + - - \${project.artifactId} + + \${project.artifactId} @@ -190,17 +190,17 @@ - - - - maven-war-plugin - \${version.war.plugin} - - - false - - - + + + + maven-war-plugin + \${version.war.plugin} + + + false + + + org.wildfly.plugins @@ -219,7 +219,7 @@ true - + @@ -23,7 +23,7 @@ .gitignore - + src/main/java diff --git a/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/README.txt b/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/README.txt index cfe6ea83..8ab42fcd 100644 --- a/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/README.txt +++ b/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/README.txt @@ -30,17 +30,17 @@ The configuration can be found in "${rootArtifactId}/pom.xml": Three profiles are defined: -"default": no integration tests are executed. --"arq-remote": you have to start a WildFly server on your machine. The tests are executed by deploying +-"arq-remote": you have to start a WildFly server on your machine. The tests are executed by deploying the application to this server. Here the "maven-failsafe-plugin" is enabled so that integration tests can be run. Run maven with these arguments: "clean verify -Parq-remote" --"arq-managed": this requires the environment variable "JBOSS_HOME" to be set: +-"arq-managed": this requires the environment variable "JBOSS_HOME" to be set: The server found in this path is started and the tests are executed by deploying the application to this server. Instead of using this environment variable, you can also define the path in "arquillian.xml". Here the "maven-failsafe-plugin" is enabled so that integration tests can be run. Run maven with these arguments: "clean verify -Parq-managed" -The Arquillian test runner is configured with the file "src/test/resources/arquillian.xml" +The Arquillian test runner is configured with the file "src/test/resources/arquillian.xml" (duplicated in EJB and WEB project, depending where your tests are placed). The profile "arq-remote" uses the container qualifier "remote" in this file. The profile "arq-managed" uses the container qualifier "managed" in this file. @@ -50,7 +50,7 @@ You can delete this test file if no tests are necessary. Why integration tests instead of the "maven-surefire-plugin" testrunner? The Arquillian test runner deploys the WAR file to the WildFly server and thus you have to build it yourself with the ShrinkWrap API. -The goal "verify" (which triggers the maven-surefire-plugin) is executed later in the maven build lifecyle than the "test" goal so that the target +The goal "verify" (which triggers the maven-surefire-plugin) is executed later in the maven build lifecyle than the "test" goal so that the target artifact ("${rootArtifactId}.war") is already built. You can build the final WAR by including those files. The "maven-surefire-plugin" is executed before the WAR file -are created, so this WAR files would have to be built in the "@Deployment" method, too. +are created, so this WAR files would have to be built in the "@Deployment" method, too. diff --git a/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/src/test/java/test/SampleIT.java b/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/src/test/java/test/SampleIT.java index 33363703..4dc0febd 100644 --- a/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/src/test/java/test/SampleIT.java +++ b/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/src/test/java/test/SampleIT.java @@ -13,7 +13,7 @@ /** * Sample integration test: demonstrates how to create the WAR file using the ShrinkWrap API. - * + * * Delete this file if no integration test is required. */ @RunWith(Arquillian.class) @@ -21,7 +21,7 @@ public class SampleIT { /** * Creates the WAR file that is deployed to the server. - * + * * @return WAR archive */ @Deployment @@ -32,7 +32,7 @@ public static Archive getEarArchive() { throw new RuntimeException("File " + f.getAbsolutePath() + " does not exist."); } WebArchive war = ShrinkWrap.create(ZipImporter.class, "${rootArtifactId}.war").importFrom(f).as(WebArchive.class); - + // Add the package containing the test classes: war.addPackage("${package}.test"); @@ -44,7 +44,7 @@ public static Archive getEarArchive() { /** * A sample test... - * + * */ @Test public void test() { diff --git a/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/src/test/resources/arquillian.xml b/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/src/test/resources/arquillian.xml index 573eb450..984d4c04 100644 --- a/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/src/test/resources/arquillian.xml +++ b/wildfly-jakartaee-webapp-archetype/src/main/resources/archetype-resources/src/test/resources/arquillian.xml @@ -36,7 +36,7 @@ EAP_HOME --> - + diff --git a/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/ArchetypeIT.java b/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/ArchetypeIT.java index 0af16661..04ec9e3f 100644 --- a/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/ArchetypeIT.java +++ b/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/ArchetypeIT.java @@ -16,10 +16,10 @@ public class ArchetypeIT extends SampleIT{ @EJB private TestLocal testLocal; - + /** * A sample test... - * + * */ @Test public void test() { @@ -27,7 +27,7 @@ public void test() { System.out.println("================================================="); System.out.println("Test is invoked..."); System.out.println("================================================="); - + this.testLocal.doTest ("test"); } } diff --git a/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/TestBean.java b/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/TestBean.java index a2a95748..970179f4 100644 --- a/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/TestBean.java +++ b/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/TestBean.java @@ -4,7 +4,7 @@ /** * This bean is invoked by the Arquillian unit test. - * + * */ @Stateless() public class TestBean implements TestRemote, TestLocal @@ -18,16 +18,16 @@ public TestBean() /** * This method is invoked by the Arquillian unit test. - * + * * @param test Some test string * @return value of parameter "test" */ public String doTest(String test) { System.out.println("================================================="); - System.out.println("doTest is invoked with parameter 'test' = " + test); + System.out.println("doTest is invoked with parameter 'test' = " + test); System.out.println("================================================="); - + return test; } } diff --git a/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/TestLocal.java b/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/TestLocal.java index f91319a8..9edd2da3 100644 --- a/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/TestLocal.java +++ b/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/TestLocal.java @@ -3,14 +3,14 @@ /** * Local interface of the Arquillian unit test bean. - * + * */ @Local public interface TestLocal { /** * This method is invoked by the Arquillian unit test. - * + * * @param test Some test string * @return value of parameter "test" */ diff --git a/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/TestRemote.java b/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/TestRemote.java index 08771c68..86fe7983 100644 --- a/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/TestRemote.java +++ b/wildfly-jakartaee-webapp-archetype/testing/additionalfiles/TestRemote.java @@ -3,14 +3,14 @@ /** * Remote interface of the Arquillian unit test bean. - * + * */ @Remote public interface TestRemote { /** * This method is invoked by the Arquillian unit test. - * + * * @param test Some test string * @return value of parameter "test" */ diff --git a/wildfly-jakartaee-webapp-archetype/testing/runtest_managed.bat b/wildfly-jakartaee-webapp-archetype/testing/runtest_managed.bat index 27901324..eab3a5c3 100644 --- a/wildfly-jakartaee-webapp-archetype/testing/runtest_managed.bat +++ b/wildfly-jakartaee-webapp-archetype/testing/runtest_managed.bat @@ -1,13 +1,13 @@ @REM Creates a project from the archetype, copies some additional source files and runs an integration test @REM using the profile "arq-managed". @REM Prerequesites: the environment variable JBOSS_HOME must point to the WildFly server corresponding to the archetyp version. -@REM The current archetype version must be the first argument to the batch file call. +@REM The current archetype version must be the first argument to the batch file call. @echo off @if "%1" == "" ( echo Archetype version must be first argument to the call to the batch file. - set /p archetypeVersion=Please enter archetype version: + set /p archetypeVersion=Please enter archetype version: ) else ( set archetypeVersion=%1 ) diff --git a/wildfly-jakartaee-webapp-archetype/testing/runtest_managed.sh b/wildfly-jakartaee-webapp-archetype/testing/runtest_managed.sh index 20fd8f80..e8ca6edf 100755 --- a/wildfly-jakartaee-webapp-archetype/testing/runtest_managed.sh +++ b/wildfly-jakartaee-webapp-archetype/testing/runtest_managed.sh @@ -2,7 +2,7 @@ # Creates a project from the archetype, copies some additional source files and runs an integration test # using the profile "arq-managed". # Prerequesites: the environment variable JBOSS_HOME must point to the WildFly server corresponding to the archetyp version. -# The current archetype version must be the first argument to the batch file call. +# The current archetype version must be the first argument to the batch file call. if [ -z "$1" ] then diff --git a/wildfly-jakartaee-webapp-archetype/testing/runtest_remote.bat b/wildfly-jakartaee-webapp-archetype/testing/runtest_remote.bat index 31ec7de7..a74b292f 100644 --- a/wildfly-jakartaee-webapp-archetype/testing/runtest_remote.bat +++ b/wildfly-jakartaee-webapp-archetype/testing/runtest_remote.bat @@ -1,13 +1,13 @@ @REM Creates a project from the archetype, copies some additional source files and runs an integration test @REM using the profile "arq-remote". @REM Prerequesites: a WildFly server corresponding to the archetyp version must be running on localhost. -@REM The current archetype version must be the first argument to the batch file call. +@REM The current archetype version must be the first argument to the batch file call. @echo off @if "%1" == "" ( echo Archetype version must be first argument to the call to the batch file. - set /p archetypeVersion=Please enter archetype version: + set /p archetypeVersion=Please enter archetype version: ) else ( set archetypeVersion=%1 ) diff --git a/wildfly-jakartaee-webapp-archetype/testing/runtest_remote.sh b/wildfly-jakartaee-webapp-archetype/testing/runtest_remote.sh index 3fa61d16..bacb925c 100755 --- a/wildfly-jakartaee-webapp-archetype/testing/runtest_remote.sh +++ b/wildfly-jakartaee-webapp-archetype/testing/runtest_remote.sh @@ -2,7 +2,7 @@ # Creates a project from the archetype, copies some additional source files and runs an integration test # using the profile "arq-remote". # Prerequesites: a WildFly server corresponding to the archetyp version must be running on localhost. -# The current archetype version must be the first argument to the batch file call. +# The current archetype version must be the first argument to the batch file call. if [ -z "$1" ] then diff --git a/wildfly-subsystem-archetype/Readme.adoc b/wildfly-subsystem-archetype/Readme.adoc index a5cb3b67..9feb65dd 100644 --- a/wildfly-subsystem-archetype/Readme.adoc +++ b/wildfly-subsystem-archetype/Readme.adoc @@ -4,7 +4,7 @@ WildFly archetype for a subsystem project [[introduction]] ==== Introduction -This archetype creates a subsystem project. +This archetype creates a subsystem project. See https://docs.wildfly.org/26/Extending_WildFly.html @@ -30,7 +30,7 @@ $ mvn archetype:generate -DgroupId=com.acme -DartifactId=example-subsystem -Dver [[testing]] ==== Test the archetype -After having built the archetype, check whether the subsystem can be loaded in WildFly. This is done by using scripts "runtest.bat" or "runtest.sh" found in the directory "testing". +After having built the archetype, check whether the subsystem can be loaded in WildFly. This is done by using scripts "runtest.bat" or "runtest.sh" found in the directory "testing". The scripts require current archetype version as argument. The script diff --git a/wildfly-subsystem-archetype/pom.xml b/wildfly-subsystem-archetype/pom.xml index 4c009981..2e6c9d39 100644 --- a/wildfly-subsystem-archetype/pom.xml +++ b/wildfly-subsystem-archetype/pom.xml @@ -14,7 +14,7 @@ wildfly-archetypes 30.0.1.Final-SNAPSHOT ../pom.xml - + wildfly-subsystem maven-archetype diff --git a/wildfly-subsystem-archetype/src/main/resources-filtered/archetype-resources/pom.xml b/wildfly-subsystem-archetype/src/main/resources-filtered/archetype-resources/pom.xml index 2eeea5fb..4e2187dc 100644 --- a/wildfly-subsystem-archetype/src/main/resources-filtered/archetype-resources/pom.xml +++ b/wildfly-subsystem-archetype/src/main/resources-filtered/archetype-resources/pom.xml @@ -18,13 +18,13 @@ 4.13.2 UTF-8 \${module} - - + + ${version.compiler.plugin} ${version.surefire.plugin} ${version.antrun.plugin} - + ${maven.compiler.release}
@@ -69,7 +69,7 @@ org.apache.maven.plugins maven-antrun-plugin false - \${version.antrun.plugin} + \${version.antrun.plugin} build-dist diff --git a/wildfly-subsystem-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/wildfly-subsystem-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml index f595a0c6..8db38119 100644 --- a/wildfly-subsystem-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml +++ b/wildfly-subsystem-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -1,10 +1,10 @@ - @@ -14,7 +14,7 @@ - + @@ -28,7 +28,7 @@ .gitignore - + src/main/java @@ -45,14 +45,14 @@ LocalDescriptions.properties - - + + src/main/resources META-INF/**/*.* - module/**/*.* - schema/*.* + module/**/*.* + schema/*.* diff --git a/wildfly-subsystem-archetype/src/main/resources/archetype-resources/README.txt b/wildfly-subsystem-archetype/src/main/resources/archetype-resources/README.txt index 1f0d96c7..1786e0a8 100644 --- a/wildfly-subsystem-archetype/src/main/resources/archetype-resources/README.txt +++ b/wildfly-subsystem-archetype/src/main/resources/archetype-resources/README.txt @@ -16,7 +16,7 @@ Register the extension in "standalone.xml" and add the subsystem configuration: ... - + Step 2: diff --git a/wildfly-subsystem-archetype/src/main/resources/archetype-resources/src/main/resources/module/main/module.xml b/wildfly-subsystem-archetype/src/main/resources/archetype-resources/src/main/resources/module/main/module.xml index 3f4ed9d5..16bf99c6 100644 --- a/wildfly-subsystem-archetype/src/main/resources/archetype-resources/src/main/resources/module/main/module.xml +++ b/wildfly-subsystem-archetype/src/main/resources/archetype-resources/src/main/resources/module/main/module.xml @@ -2,7 +2,7 @@ - + diff --git a/wildfly-subsystem-archetype/testing/restore-configuration-and-stop.cli b/wildfly-subsystem-archetype/testing/restore-configuration-and-stop.cli index dcfec994..4f391ece 100644 --- a/wildfly-subsystem-archetype/testing/restore-configuration-and-stop.cli +++ b/wildfly-subsystem-archetype/testing/restore-configuration-and-stop.cli @@ -17,4 +17,4 @@ extension-commands --errors reload # Stop the server -shutdown \ No newline at end of file +shutdown \ No newline at end of file diff --git a/wildfly-subsystem-archetype/testing/runtest.bat b/wildfly-subsystem-archetype/testing/runtest.bat index c00e6fd8..ba284534 100644 --- a/wildfly-subsystem-archetype/testing/runtest.bat +++ b/wildfly-subsystem-archetype/testing/runtest.bat @@ -6,10 +6,10 @@ @REM 5) registers the subsystem using a CLI script @REM 6) waits for the user to check that the debugging output of the subsystem was printed @REM 7) finally unregisters the subsystem and stops WildFly -@REM Prerequesites: +@REM Prerequesites: @REM -the environment variable JBOSS_HOME must point to the WildFly server corresponding to the archetyp version. @REM -the git tool "patch.exe" must be found in the path -@REM The current archetype version must be the first argument to the batch file call. +@REM The current archetype version must be the first argument to the batch file call. @echo off @@ -29,7 +29,7 @@ if ERRORLEVEL 1 ( @REM We need the version of the archetype to create the test project from: @if "%1" == "" ( echo Archetype version must be first argument to the call to the batch file. - set /p archetypeVersion=Please enter archetype version: + set /p archetypeVersion=Please enter archetype version: ) else ( set archetypeVersion=%1 ) diff --git a/wildfly-subsystem-archetype/testing/runtest.sh b/wildfly-subsystem-archetype/testing/runtest.sh index a18db967..81dcdbde 100755 --- a/wildfly-subsystem-archetype/testing/runtest.sh +++ b/wildfly-subsystem-archetype/testing/runtest.sh @@ -7,10 +7,10 @@ # 5) registers the subsystem using a CLI script # 6) waits for the user to check that the debugging output of the subsystem was printed # 7) finally unregisters the subsystem and stops WildFly -# Prerequesites: +# Prerequesites: # -the environment variable JBOSS_HOME must point to the WildFly server corresponding to the archetyp version. # -the git tool "patch.exe" must be found in the path -# The current archetype version must be the first argument to the script call. +# The current archetype version must be the first argument to the script call. # check that JBOSS_HOME is set: