D Tim Cummings created TAP5-2802:
------------------------------------
Summary: Quickstart with jakarta
Key: TAP5-2802
URL: https://issues.apache.org/jira/browse/TAP5-2802
Project: Tapestry 5
Issue Type: Bug
Components: quickstart
Affects Versions: 5.9.0
Reporter: D Tim Cummings
{*}ISSUE 0{*}: archetype generate command `mvn archetype:generate
-Dfilter=org.apache.tapestry:quickstart` on web page
[https://tapestry.apache.org/getting-started.html] doesn't give access to
recent versions after 5.8.0. Web page should recommend the following command:
{{mvn archetype:generate \}}
{{ -DinteractiveMode=false \}}
{{ -DarchetypeGroupId=org.apache.tapestry \}}
{{ -DarchetypeArtifactId=quickstart \}}
{{ -DarchetypeVersion=5.9.0 \}}
{{ -DgroupId=com.example.quickstart \}}
{{ -DartifactId=tap590 \}}
{{ -Dversion=1.0-SNAPSHOT \}}
{{ -Dpackage=com.example.quickstart.tap590}}
{{cd tap590}}
{{mvn jetty:run}}
{*}ISSUE 1{*}: Caused by: java.lang.ClassNotFoundException: javax.servlet.Filter
{*}FIX 1{*}: need to change the artifactIds in pom.xml
tapestry-core => tapestry-core-jakarta
tapestry-webresources => tapestry-webresources-jakarta
Now the app will run [http://localhost:8080|http://localhost:8080/]
{*}ISSUE 2{*}: Lots of classes scanned from multiple locations.
For example
[WARNING] com.google.common.annotations.Beta scanned from multiple locations:
jar:[file:///home/user/.m2/repository/com/google/guava/guava/31.1-jre/guava-31.1-jre.jar!/com/google/common/annotations/Beta.class],
jar:[file:///home/user/.m2/repository/com/google/javascript/closure-compiler-unshaded/v20220502/closure-compiler-unshaded-v20220502.jar!/com/google/common/annotations/Beta.class]
{*}FIX 2{*}: Removing tapestry-webresources-jakarta from the pom.xml will
eliminate all of these warnings. I don't know what the fix is if you want to
keep tapestry-webresources-jakarta in the pom.
{*}ISSUE 3{*}: The POM for
org.apache.maven.plugins:maven-surefire-plugin:jar:3.1 is missing, no
dependency information available
{*}FIX 3{*}: I think this is a typo in pom.xml. Should be
{{<maven-surefire-version>3.5.2</maven-surefire-version>}}
{*}ISSUE 4{*}: Red Hat Overview of security issues identified 5 high
vulnerabilities and 5 medium vulnerabilities, all to do with
com.fasterxml.jackson.dataformat:jackson-dataformat-yaml 2.13.1 and
com.fasterxml.jackson.core:jackson-databind 2.13.1.
{*}FIX 4{*}: In pom.xml. upgrading jackson-version to 2.18.3 will solve the
problem
{{<jackson-version>2.18.3</jackson-version>}}
While upgrading, the following dependencies could also be upgraded. (from `mvn
versions:display-dependency-updates`)
{{<junit-version>5.12.0</junit-version>}}
{{<yasson-version>3.0.4</yasson-version>}}
{*}ISSUE 5{*}: [ERROR] Project requires an incorrect minimum version of Maven.
(as highlighted by `mvn versions:display-plugin-updates`)
{{{*}FIX 5{*}: In pom.xml update maven-enforcer-plugin version and required
maven version}}
{{<plugin>}}
{{ <groupId>org.apache.maven.plugins</groupId>}}
{{ <artifactId>maven-enforcer-plugin</artifactId>}}
{{ <version>3.5.0</version>}}
{{ <executions>}}
{{ <execution>}}
{{ <id>enforce-maven</id>}}
{{ <goals>}}
{{ <goal>enforce</goal>}}
{{ </goals>}}
{{ <configuration>}}
{{ <rules>}}
{{ <requireMavenVersion>}}
{{ <version>3.6.3</version>}}
{{ </requireMavenVersion>}}
{{ </rules>}}
{{ </configuration>}}
{{ </execution>}}
{{ </executions>}}
{{</plugin>}}
{{While upgrading plugins, could also upgrade to the following versions}}
{{<maven-compiler-version>3.14.0</maven-compiler-version>}}
{{<maven-war-version>3.4.0</maven-war-version>}}
{*}ISSUE 6{*}: src/main/webapp/WEB-INF/web.xml uses old namespaces linked to
javaee
<web-app xmlns="https://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://xmlns.jcp.org/xml/ns/javaee
[https://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd]"
version="3.1">
{*}FIX 6{*}: should be
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
[https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd]"
version="5.0">
{*}ISSUE 7{*}: Jetty 12 now available
{*}FIX 7{*}: In pom.xml update the new version in properties and update the
plugin
<maven-jetty-version>12.0.14</maven-jetty-version>
{{<plugin>}}
{{ <groupId>org.eclipse.jetty.ee9</groupId>}}
{{ <artifactId>jetty-ee9-maven-plugin</artifactId>}}
{{ <version>${maven-jetty-version}</version>}}
{{ <configuration>}}
{{ <webApp>}}
{{ <contextPath>/</contextPath>}}
{{ </webApp>}}
{{ <scan>10</scan>}}
{{ <httpConnector>}}
{{ <port>8080</port>}}
{{ </httpConnector>}}
{{ </configuration>}}
{{</plugin>}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)