Lukasz Lenart created WW-5865:
---------------------------------

             Summary: Move a reduced set of Maven archetypes back into the main 
repository
                 Key: WW-5865
                 URL: https://issues.apache.org/jira/browse/WW-5865
             Project: Struts 2
          Issue Type: Improvement
          Components: Maven Archetypes
            Reporter: Lukasz Lenart
             Fix For: 7.6.0


h2. Problem

The archetypes live in the separate {{apache/struts-archetypes}} repository, 
which has had no commits since February 2023. It is on {{6.1.0-SNAPSHOT}}, 
generates projects for Struts 6.1.1 and uses {{javax.servlet}}. Nothing in the 
Struts build exercises the archetypes, so they drift with every release, and 
Struts 7 users get a project skeleton that does not compile against Struts 7.

h2. Proposal

Bring three archetypes into a new {{archetypes}} module of the main build, 
versioned and released together with Struts:
* {{struts2-archetype-blank}}: ported from {{struts-archetypes}}, a plain web 
application (XML configuration, JSP)
* {{struts2-archetype-convention}}: ported from {{struts-archetypes}}, a 
Convention plugin based web application
* {{struts2-archetype-rest}}: new, reduced from {{apps/rest-showcase}}, a REST 
plugin based web application

Details:
* Existing coordinates are kept, so current {{mvn archetype:generate}} 
instructions keep working.
* Each archetype is ported to Jakarta EE and Java 17, and stripped of leftovers 
(the Config Browser plugin, Google App Engine files).
* Each generated project includes a {{Dockerfile}}: a multi-stage build that 
packages the WAR with Maven and runs it on a Tomcat 10.1 / JRE 17 image.
* Each archetype gets an integration test that generates a project and builds 
and tests it as part of the reactor build, so the archetypes cannot fall behind 
the framework again.

h2. Not carried over
* {{angularjs}}: AngularJS has been end of life since 2021
* {{portlet}} and {{dbportlet}}: the Portlet plugin was removed in Struts 7
* {{starter}}: depends on SiteMesh and DWR

h2. Afterwards

Archive {{apache/struts-archetypes}} once the first release containing the 
archetypes is out.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to