Skip to content

Commit 0c77869

Browse files
pstefaniak7Przemyslaw Stefaniak
andauthored
Jakarta switch for 3.1 (#2)
* velocity tools jakarta switch * velocity tools jakarta 2 --------- Co-authored-by: Przemyslaw Stefaniak <przemyslaw.stefaniak@alfasystems.com>
1 parent 8e7f20a commit 0c77869

59 files changed

Lines changed: 372 additions & 289 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pom.xml

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
<groupId>org.apache.velocity.tools</groupId>
3232
<artifactId>velocity-tools-parent</artifactId>
33-
<version>3.1</version>
33+
<version>3.1-alfa1001</version>
3434
<packaging>pom</packaging>
3535

3636
<name>VelocityTools</name>
@@ -60,7 +60,7 @@
6060
<connection>scm:git:https://gitbox.apache.org/repos/asf/velocity-tools.git</connection>
6161
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/velocity-tools.git</developerConnection>
6262
<url>https://gitbox.apache.org/repos/asf?p=velocity-tools.git</url>
63-
<tag>3.1-RC1</tag>
63+
<tag>3.1-alfa1001</tag>
6464
</scm>
6565
<issueManagement>
6666
<system>jira</system>
@@ -129,12 +129,12 @@
129129
<dependency>
130130
<groupId>org.apache.velocity</groupId>
131131
<artifactId>velocity-engine-core</artifactId>
132-
<version>2.3</version>
132+
<version>2.4.1</version>
133133
</dependency>
134134
<dependency>
135135
<groupId>org.apache.commons</groupId>
136136
<artifactId>commons-lang3</artifactId>
137-
<version>3.10</version>
137+
<version>3.18.0</version>
138138
</dependency>
139139
<dependency>
140140
<groupId>org.apache.commons</groupId>
@@ -159,19 +159,19 @@
159159
<version>${slf4j.version}</version>
160160
</dependency>
161161
<dependency>
162-
<groupId>javax.servlet</groupId>
163-
<artifactId>javax.servlet-api</artifactId>
164-
<version>3.1.0</version>
162+
<groupId>jakarta.servlet</groupId>
163+
<artifactId>jakarta.servlet-api</artifactId>
164+
<version>5.0.0</version>
165165
</dependency>
166166
<dependency>
167-
<groupId>javax.servlet.jsp</groupId>
168-
<artifactId>javax.servlet.jsp-api</artifactId>
169-
<version>2.3.3</version>
167+
<groupId>jakarta.servlet.jsp</groupId>
168+
<artifactId>jakarta.servlet.jsp-api</artifactId>
169+
<version>3.0.0</version>
170170
</dependency>
171171
<dependency>
172-
<groupId>javax.el</groupId>
173-
<artifactId>javax.el-api</artifactId>
174-
<version>3.0.0</version>
172+
<groupId>jakarta.el</groupId>
173+
<artifactId>jakarta.el-api</artifactId>
174+
<version>4.0.0</version>
175175
</dependency>
176176
<dependency>
177177
<groupId>junit</groupId>
@@ -181,7 +181,7 @@
181181
<dependency>
182182
<groupId>org.easymock</groupId>
183183
<artifactId>easymock</artifactId>
184-
<version>4.2</version>
184+
<version>5.2.0</version>
185185
</dependency>
186186
</dependencies>
187187
</dependencyManagement>
@@ -243,6 +243,27 @@
243243
</execution>
244244
</executions>
245245
</plugin>
246+
<plugin>
247+
<groupId>org.apache.maven.plugins</groupId>
248+
<artifactId>maven-enforcer-plugin</artifactId>
249+
<version>3.5.0</version>
250+
<executions>
251+
<execution>
252+
<id>enforce-bytecode-version</id>
253+
<goals>
254+
<goal>enforce</goal>
255+
</goals>
256+
<configuration>
257+
<rules>
258+
<enforceBytecodeVersion>
259+
<maxJdkVersion>11</maxJdkVersion>
260+
</enforceBytecodeVersion>
261+
</rules>
262+
</configuration>
263+
</execution>
264+
</executions>
265+
</plugin>
266+
246267
</plugins>
247268
</build>
248269
</project>

velocity-tools-examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<parent>
2626
<groupId>org.apache.velocity.tools</groupId>
2727
<artifactId>velocity-tools-parent</artifactId>
28-
<version>3.1</version>
28+
<version>3.1-alfa1001</version>
2929
</parent>
3030

3131
<artifactId>velocity-tools-examples</artifactId>

velocity-tools-examples/velocity-tools-examples-showcase/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<parent>
2626
<groupId>org.apache.velocity.tools</groupId>
2727
<artifactId>velocity-tools-examples</artifactId>
28-
<version>3.1</version>
28+
<version>3.1-alfa1001</version>
2929
</parent>
3030

3131
<artifactId>velocity-tools-examples-showcase</artifactId>
@@ -36,8 +36,8 @@
3636

3737
<dependencies>
3838
<dependency>
39-
<groupId>javax.servlet</groupId>
40-
<artifactId>javax.servlet-api</artifactId>
39+
<groupId>jakarta.servlet</groupId>
40+
<artifactId>jakarta.servlet-api</artifactId>
4141
<scope>provided</scope>
4242
</dependency>
4343
<dependency>
@@ -85,11 +85,11 @@
8585
</plugin>
8686
<plugin>
8787
<groupId>org.codehaus.cargo</groupId>
88-
<artifactId>cargo-maven2-plugin</artifactId>
89-
<version>1.7.10</version>
88+
<artifactId>cargo-maven3-plugin</artifactId>
89+
<version>1.10.12</version>
9090
<configuration>
9191
<container>
92-
<containerId>jetty9x</containerId>
92+
<containerId>jetty11x</containerId>
9393
</container>
9494
<configuration>
9595
<files>

velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/ShowcaseLayoutServlet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.apache.velocity.tools.view.VelocityLayoutServlet;
44

5-
import javax.servlet.http.HttpServletRequest;
5+
import jakarta.servlet.http.HttpServletRequest;
66

77
public class ShowcaseLayoutServlet extends VelocityLayoutServlet
88
{

velocity-tools-examples/velocity-tools-examples-showcase/src/main/java/org/apache/velocity/tools/examples/showcase/sample/SampleListInitializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import java.util.ArrayList;
44
import java.util.List;
55

6-
import javax.servlet.ServletContextEvent;
7-
import javax.servlet.ServletContextListener;
6+
import jakarta.servlet.ServletContextEvent;
7+
import jakarta.servlet.ServletContextListener;
88

99
public class SampleListInitializer implements ServletContextListener
1010
{

velocity-tools-examples/velocity-tools-examples-simple/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<parent>
2626
<groupId>org.apache.velocity.tools</groupId>
2727
<artifactId>velocity-tools-examples</artifactId>
28-
<version>3.1</version>
28+
<version>3.1-alfa1001</version>
2929
</parent>
3030

3131
<artifactId>velocity-tools-examples-simple</artifactId>
@@ -36,13 +36,13 @@
3636

3737
<dependencies>
3838
<dependency>
39-
<groupId>javax.servlet</groupId>
40-
<artifactId>javax.servlet-api</artifactId>
39+
<groupId>jakarta.servlet</groupId>
40+
<artifactId>jakarta.servlet-api</artifactId>
4141
<scope>provided</scope>
4242
</dependency>
4343
<dependency>
44-
<groupId>javax.servlet.jsp</groupId>
45-
<artifactId>javax.servlet.jsp-api</artifactId>
44+
<groupId>jakarta.servlet.jsp</groupId>
45+
<artifactId>jakarta.servlet.jsp-api</artifactId>
4646
<scope>provided</scope>
4747
</dependency>
4848
<dependency>

velocity-tools-generic/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<parent>
2626
<groupId>org.apache.velocity.tools</groupId>
2727
<artifactId>velocity-tools-parent</artifactId>
28-
<version>3.1</version>
28+
<version>3.1-alfa1001</version>
2929
</parent>
3030

3131
<artifactId>velocity-tools-generic</artifactId>

velocity-tools-view-jsp/pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<parent>
2626
<groupId>org.apache.velocity.tools</groupId>
2727
<artifactId>velocity-tools-parent</artifactId>
28-
<version>3.1</version>
28+
<version>3.1-alfa1001</version>
2929
</parent>
3030

3131
<artifactId>velocity-tools-view-jsp</artifactId>
@@ -35,18 +35,18 @@
3535

3636
<dependencies>
3737
<dependency>
38-
<groupId>javax.servlet</groupId>
39-
<artifactId>javax.servlet-api</artifactId>
38+
<groupId>jakarta.servlet</groupId>
39+
<artifactId>jakarta.servlet-api</artifactId>
4040
<scope>provided</scope>
4141
</dependency>
4242
<dependency>
43-
<groupId>javax.servlet.jsp</groupId>
44-
<artifactId>javax.servlet.jsp-api</artifactId>
43+
<groupId>jakarta.servlet.jsp</groupId>
44+
<artifactId>jakarta.servlet.jsp-api</artifactId>
4545
<scope>provided</scope>
4646
</dependency>
4747
<dependency>
48-
<groupId>javax.el</groupId>
49-
<artifactId>javax.el-api</artifactId>
48+
<groupId>jakarta.el</groupId>
49+
<artifactId>jakarta.el-api</artifactId>
5050
<scope>provided</scope>
5151
</dependency>
5252
<dependency>

velocity-tools-view-jsp/src/main/java/org/apache/velocity/tools/view/jsp/JspToolContext.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
* under the License.
2020
*/
2121

22-
import javax.servlet.http.HttpServletRequest;
23-
import javax.servlet.http.HttpServletResponse;
24-
import javax.servlet.jsp.PageContext;
2522
import org.apache.velocity.app.VelocityEngine;
2623
import org.apache.velocity.tools.view.ViewToolContext;
2724

25+
import jakarta.servlet.http.HttpServletRequest;
26+
import jakarta.servlet.http.HttpServletResponse;
27+
import jakarta.servlet.jsp.PageContext;
28+
2829
/**
2930
* <p>Velocity context implementation specific to the JSP environment.</p>
3031
*

velocity-tools-view-jsp/src/main/java/org/apache/velocity/tools/view/jsp/VelocityViewTag.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,19 @@
2121

2222
import java.io.StringWriter;
2323
import java.io.Writer;
24-
import javax.servlet.http.HttpServletRequest;
25-
import javax.servlet.jsp.JspException;
26-
import javax.servlet.jsp.PageContext;
27-
import javax.servlet.jsp.tagext.BodyTagSupport;
24+
2825
import org.apache.velocity.Template;
2926
import org.apache.velocity.app.VelocityEngine;
3027
import org.apache.velocity.runtime.resource.loader.StringResourceLoader;
3128
import org.apache.velocity.runtime.resource.util.StringResourceRepository;
3229
import org.apache.velocity.tools.view.ServletUtils;
33-
import org.apache.velocity.tools.view.ViewToolContext;
3430
import org.apache.velocity.tools.view.VelocityView;
31+
import org.apache.velocity.tools.view.ViewToolContext;
32+
33+
import jakarta.servlet.http.HttpServletRequest;
34+
import jakarta.servlet.jsp.JspException;
35+
import jakarta.servlet.jsp.PageContext;
36+
import jakarta.servlet.jsp.tagext.BodyTagSupport;
3537

3638
/**
3739
* <p>This tag enables use of Velocity and VelocityTools within JSP files and tags.

0 commit comments

Comments
 (0)