Skip to content

Commit

Permalink
WN-5141
Browse files Browse the repository at this point in the history
- try shade plugin
  • Loading branch information
jdyer1 committed Nov 14, 2023
1 parent 818ca1f commit deebfc3
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
<dependencies>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-freemarker-jakarta</artifactId>
<artifactId>struts2-freemarker-jakarta-shaded</artifactId>
</dependency>

<dependency>
Expand Down
3 changes: 3 additions & 0 deletions freemarker-jakarta-shaded/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Struts 2 Freemarker Jakarta
This uses the eclipse transformer maven plugin to make the Freemarker dependency Jakarta EE 9+ compatible.

143 changes: 143 additions & 0 deletions freemarker-jakarta-shaded/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more
contributor license agreements. See the NOTICE file
* distributed with this
work for additional information
* regarding copyright ownership. The ASF
licenses this file
* to you under the Apache License, Version 2.0 (the
*
"License"); you may not use this file except in compliance
* with the License.
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, 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.
*/
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>6.4.0-SNAPSHOT</version>
</parent>
<artifactId>struts2-freemarker-jakarta-shaded</artifactId>
<packaging>jar</packaging>
<name>Struts 2 Jakarta EE Compatible Freemarker</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.site.skip>true</maven.site.skip>
<maven.site.deploy.skip>true</maven.site.deploy.skip>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<include>org.freemarker:freemarker</include>
</artifactSet>

<relocations>
<relocation>
<pattern>freemarker</pattern>
<shadedPattern>freemarker.javax</shadedPattern>
<includes>
<include>
freemarker.cache.WebappTemplateLoader</include>
<include>
freemarker.ext.jsp.TagTransformModel</include>
<include>
freemarker.ext.jsp.JspContextModel</include>
<include>
freemarker.ext.jsp.FreeMarkerJspFactory21</include>
<include>
freemarker.ext.jsp.PageContextFactory</include>
<include>
freemarker.ext.jsp.EventForwarding</include>
<include>
freemarker.ext.jsp.JspWriterAdapter</include>
<include>
freemarker.ext.jsp._FreeMarkerPageContext2</include>
<include>
freemarker.ext.jsp.TaglibFactory</include>
<include>
freemarker.ext.jsp.FreeMarkerPageContext</include>
<include>
freemarker.ext.jsp.FreemarkerTag</include>
<include>
freemarker.ext.jsp.FreeMarkerJspApplicationContext</include>
<include>
freemarker.ext.jsp._FreeMarkerPageContext21</include>
<include>
freemarker.ext.jsp.FreeMarkerJspFactory</include>
<include>
freemarker.ext.jsp.SimpleTagDirectiveModel</include>
<include>
freemarker.ext.servlet.AllHttpScopesHashModel</include>
<include>
freemarker.ext.servlet.ServletContextHashModel</include>
<include>
freemarker.ext.servlet.InitParamParser</include>
<include>
freemarker.ext.servlet.IncludePage</include>
<include>
freemarker.ext.servlet.FreemarkerServlet</include>
<include>
freemarker.ext.servlet.HttpRequestParametersHashModel</include>
<include>
freemarker.ext.servlet.HttpSessionHashModel</include>
<include>
freemarker.ext.servlet.HttpRequestHashModel</include>
<include>
freemarker.ext.ant.FreemarkerXmlTask</include>
<include>
freemarker.ext.dom.JaxenXPathSupport</include>
<include>freemarker.ext.dom.NodeModel</include>
<include>
freemarker.ext.dom.SunInternalXalanXPathSupport</include>
<include>
freemarker.ext.dom.XalanXPathSupport</include>
<include>freemarker.core.FreeMarkerTree</include>
</includes>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
</dependency>
</dependencies>
</project>
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<modules>
<module>bom</module>
<module>freemarker-jakarta</module>
<module>freemarker-jakarta-shaded</module>
<module>core</module>
<module>plugins</module>
<module>bundles</module>
Expand Down Expand Up @@ -535,6 +536,11 @@
<groupId>org.apache.struts</groupId>
<artifactId>struts2-freemarker-jakarta</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-freemarker-jakarta-shaded</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
Expand Down

0 comments on commit deebfc3

Please sign in to comment.