Skip to content

Commit

Permalink
Merge pull request payara#7089 from Pandrex247/FISH-10211-MVC-and-Krazo
Browse files Browse the repository at this point in the history
FISH-10211 MVC 2.1 and Krazo 3.0
  • Loading branch information
Pandrex247 authored Dec 5, 2024
2 parents 0156e77 + 2d613ea commit 5d78710
Show file tree
Hide file tree
Showing 22 changed files with 887 additions and 2 deletions.
18 changes: 18 additions & 0 deletions api/payara-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@
<type>pom</type>
</dependency>

<!-- Jakarta MVC, which isn't a part of the Jakarta Platform BOM -->
<dependency>
<groupId>jakarta.mvc</groupId>
<artifactId>jakarta.mvc-api</artifactId>
<version>${jakarta.mvc.version}</version>
</dependency>

<!-- Microprofile API release aggregate. Can also be used as a BOM -->
<dependency>
<groupId>org.eclipse.microprofile</groupId>
Expand Down Expand Up @@ -486,6 +493,17 @@
<version>${angus-activation.version}</version>
</dependency>

<dependency>
<groupId>org.eclipse.krazo</groupId>
<artifactId>krazo-core</artifactId>
<version>${krazo.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.krazo</groupId>
<artifactId>krazo-jersey</artifactId>
<version>${krazo.version}</version>
</dependency>

<!-- Other libraries -->
<dependency>
<groupId>org.yaml</groupId>
Expand Down
8 changes: 8 additions & 0 deletions appserver/extras/embedded/all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -451,5 +451,13 @@
<type>zip</type>
<optional>true</optional>
</dependency>

<dependency>
<groupId>fish.payara.server.internal.packager</groupId>
<artifactId>payara-mvc</artifactId>
<version>${project.version}</version>
<type>zip</type>
<optional>true</optional>
</dependency>
</dependencies>
</project>
8 changes: 8 additions & 0 deletions appserver/extras/embedded/web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -389,5 +389,13 @@
<type>zip</type>
<optional>true</optional>
</dependency>

<dependency>
<groupId>fish.payara.server.internal.packager</groupId>
<artifactId>payara-mvc</artifactId>
<version>${project.version}</version>
<type>zip</type>
<optional>true</optional>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -492,5 +492,12 @@
<optional>true</optional>
</dependency>

<dependency>
<groupId>fish.payara.server.internal.packager</groupId>
<artifactId>payara-mvc</artifactId>
<version>${project.version}</version>
<type>zip</type>
<optional>true</optional>
</dependency>
</dependencies>
</project>
7 changes: 7 additions & 0 deletions appserver/featuresets/payara-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,12 @@
<version>${project.version}</version>
<type>zip</type>
</dependency>

<dependency>
<groupId>fish.payara.server.internal.packager</groupId>
<artifactId>payara-mvc</artifactId>
<version>${project.version}</version>
<type>zip</type>
</dependency>
</dependencies>
</project>
56 changes: 56 additions & 0 deletions appserver/packager/payara-mvc/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>fish.payara.server.internal.packager</groupId>
<artifactId>packages</artifactId>
<version>6.2024.12-SNAPSHOT</version>
</parent>

<artifactId>payara-mvc</artifactId>
<packaging>distribution-fragment</packaging>
<description>This pom describes how to assemble the Payara MVC package</description>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>process-step1</id>
</execution>
<execution>
<id>process-step2</id>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>process-step3</id>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>jakarta.mvc</groupId>
<artifactId>jakarta.mvc-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.krazo</groupId>
<artifactId>krazo-core</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.krazo</groupId>
<artifactId>krazo-jersey</artifactId>
</dependency>
</dependencies>
</project>
67 changes: 67 additions & 0 deletions appserver/packager/payara-mvc/src/main/assembly/payara-mvc.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright (c) 2024 Payara Foundation and/or its affiliates. All rights reserved.
The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can
obtain a copy of the License at
https://github.com/payara/Payara/blob/main/LICENSE.txt
See the License for the specific
language governing permissions and limitations under the License.
When distributing the software, include this License Header Notice in each
file and include the License file at packager/legal/LICENSE.txt.
GPL Classpath Exception:
Oracle designates this particular file as subject to the "Classpath"
exception as provided by Oracle in the GPL Version 2 section of the License
file that accompanied this code.
Modifications:
If applicable, add the following below the License Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyright [year] [name of copyright owner]"
Contributor(s):
If you wish your version of this file to be governed by only the CDDL or
only the GPL Version 2, indicate your decision by adding "[Contributor]
elects to include this software in this distribution under the [CDDL or GPL
Version 2] license." If you don't indicate a single choice of license, a
recipient has the option to distribute your version of this file under
either the CDDL, the GPL Version 2 or to extend the choice of license to
its licensees as provided above. However, if you add GPL Version 2 code
and therefore, elected the GPL Version 2 license, then the option applies
only if the new code is made subject to such option by the copyright
holder.
-->

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">

<id>stage-package</id>
<formats>
<format>dir</format>
</formats>

<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${temp.dir}/nucleus</directory>
<outputDirectory>${install.dir.name}/glassfish</outputDirectory>
</fileSet>
<fileSet>
<directory>${temp.dir}</directory>
<excludes>
<exclude>nucleus/**</exclude>
<exclude>pkg_proto.py</exclude>
</excludes>
<outputDirectory>${install.dir.name}</outputDirectory>
</fileSet>
</fileSets>
</assembly>
63 changes: 63 additions & 0 deletions appserver/packager/payara-mvc/src/main/resources/pkg_proto.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright (c) 2008-2012 Oracle and/or its affiliates. All rights reserved.
#
# The contents of this file are subject to the terms of either the GNU
# General Public License Version 2 only ("GPL") or the Common Development
# and Distribution License("CDDL") (collectively, the "License"). You
# may not use this file except in compliance with the License. You can
# obtain a copy of the License at
# https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
# or packager/legal/LICENSE.txt. See the License for the specific
# language governing permissions and limitations under the License.
#
# When distributing the software, include this License Header Notice in each
# file and include the License file at packager/legal/LICENSE.txt.
#
# GPL Classpath Exception:
# Oracle designates this particular file as subject to the "Classpath"
# exception as provided by Oracle in the GPL Version 2 section of the License
# file that accompanied this code.
#
# Modifications:
# If applicable, add the following below the License Header, with the fields
# enclosed by brackets [] replaced by your own identifying information:
# "Portions Copyright [year] [name of copyright owner]"
#
# Contributor(s):
# If you wish your version of this file to be governed by only the CDDL or
# only the GPL Version 2, indicate your decision by adding "[Contributor]
# elects to include this software in this distribution under the [CDDL or GPL
# Version 2] license." If you don't indicate a single choice of license, a
# recipient has the option to distribute your version of this file under
# either the CDDL, the GPL Version 2 or to extend the choice of license to
# its licensees as provided above. However, if you add GPL Version 2 code
# and therefore, elected the GPL Version 2 license, then the option applies
# only if the new code is made subject to such option by the copyright
# holder.
#

import imp

conf = imp.load_source("pkg_conf", "../pkg_conf.py")

pkg = {
"name" : "payara-mvc",
"version" : conf.mvc_version,
"attributes" : {
"pkg.summary" : "Payara MVC",
"pkg.description" : "Payara Model View Controller (MVC) module provides the API and Eclipse Krazo implementation for creating web applications following the action-based model-view-controller pattern. For more information, see https://jakarta.ee/specifications/mvc/. "+conf.glassfish_description_long,
"info.classification" : conf.glassfish_info_classification,
},
"depends" : {
"pkg:/glassfish-web" : {"type" : "require" },
"pkg:/glassfish-jsf" : {"type" : "require" }
},
"dirtrees" : [ "glassfish" ],
"licenses" : {
"../../../../CDDL+GPL.txt" : {"license" : "CDDL and GPL v2 with classpath exception"},
},
}
1 change: 1 addition & 0 deletions appserver/packager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
<module>microprofile-package</module>
<module>opentracing-jaxws-package</module>
<module>monitoring-console</module>
<module>payara-mvc</module>
</modules>

<properties>
Expand Down
3 changes: 2 additions & 1 deletion appserver/packager/resources/pkg_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
# So, to start with our package versions would look like 3.0,0-18.0.
#
# Now, there are some packages used in GlassFish that have their own
# well-defined versions (for example, grizzly, Felix, JavaDB etc.) and we
# well-defined versions (for example, grizzly, Felix, JavaDB etc.) and we
# will use that. We will not add build numbers for these packages. For
# example, grizzly version would look like 1.8.2-0,0.

Expand All @@ -70,6 +70,7 @@
metro_version="2.3.2,0-608"
javahelp_version="2.0.2,0-1"
shoal_version="1.7.0,0-0"
mvc_version="2.1.0,0-0"

#description
glassfish_description="GlassFish Application Server"
Expand Down
74 changes: 74 additions & 0 deletions appserver/tests/payara-samples/samples/mvc/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2024 Payara Foundation and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://github.com/payara/Payara/blob/main/LICENSE.txt
* See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at glassfish/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* The Payara Foundation designates this particular file as subject to the "Classpath"
* exception as provided by the Payara Foundation in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
-->
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>fish.payara.samples</groupId>
<artifactId>payara-samples-profiled-tests</artifactId>
<version>6.2024.12-SNAPSHOT</version>
</parent>

<artifactId>mvc</artifactId>

<name>Payara Samples - Payara - MVC</name>

<packaging>war</packaging>

<dependencies>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-web-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.mvc</groupId>
<artifactId>jakarta.mvc-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>fish.payara.samples</groupId>
<artifactId>samples-test-utils</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

</project>
Loading

0 comments on commit 5d78710

Please sign in to comment.