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.
The versions of all dependencies and plugins that are used by this archetype are configured in the parent’s pom.xml
.
To build the archetype, you need at least Java 17. Run this command:
$ mvn clean install
It will be installed to your local maven repository at "%USERHOME%/.m2/repository/org/wildfly/archetype/wildfly-jakartaee-webapp-archetype/", and an entry will be added to "%USERHOME%/.m2/repository/archetype-catalog.xml".
To create a new project from this archetype, use this maven command (replace dummy values for "groupId", "artifactId" and "version" with correct values):
$ mvn archetype:generate -DgroupId=my.project.org -DartifactId=sampleproject -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.wildfly.archetype -DarchetypeArtifactId=wildfly-jakartaee-webapp-archetype -DarchetypeVersion=30.0.0.Final-SNAPSHOT
After having built the archetype, check whether both profiles "arq-remote" and "arq-managed" work. This is done by using scripts found in the directory "testing".
-
Profile "arq-managed": set variable JBOSS_HOME, then execute "runtest_managed.bat/.sh <archetypeVersion>" (replace "<archetypeVersion>" with the current archetype version)
-
Profile "arq-remote": start WildFly server, then execute "runtest_remote.bat/.sh <archetypeVersion>" (replace "<archetypeVersion>" with the current archetype version)
Both files create a project from the archetype (in "testing/arq-managed" or "testing/arq-remote"), copy an Arquillian unit test class and an EJB in this project, then build and deploy it to WildFly and execute the test using the Arquillian profile "arq-managed" or "arq-remote").
After the test is executed, check the server log for error outputs. In case of success, the outputs "Test is invoked…" and "doTest is invoked…" will be printed in the server console.