You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/10/12 09:14:44 UTC

[tomcat] branch main updated: Add the initial plumbing for the loom module

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 39821e7b3c Add the initial plumbing for the loom module
39821e7b3c is described below

commit 39821e7b3c49af50d4ff04f139feea22edc697d2
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Oct 12 10:14:30 2022 +0100

    Add the initial plumbing for the loom module
    
    This is just a dummy implementation to check the build system is working
---
 modules/loom/.gitignore                            |   1 +
 modules/loom/pom.xml                               | 100 +++++++++++++++++++++
 .../coyote/http11/Http11BioLoomProtocol.java       |  35 ++++++++
 3 files changed, 136 insertions(+)

diff --git a/modules/loom/.gitignore b/modules/loom/.gitignore
new file mode 100644
index 0000000000..eb5a316cbd
--- /dev/null
+++ b/modules/loom/.gitignore
@@ -0,0 +1 @@
+target
diff --git a/modules/loom/pom.xml b/modules/loom/pom.xml
new file mode 100644
index 0000000000..b04f69e41b
--- /dev/null
+++ b/modules/loom/pom.xml
@@ -0,0 +1,100 @@
+<?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</groupId>
+        <artifactId>apache</artifactId>
+        <version>27</version>
+    </parent>
+
+    <groupId>org.apache.tomcat</groupId>
+    <artifactId>tomcat-coyote-loom</artifactId>
+    <name>Apache Tomcat support for Project Look</name>
+    <description>Project Loom support included in Java 19 early preview</description>
+    <version>0.1-SNAPSHOT</version>
+
+    <properties>
+        <tomcat.version>11.0.0-M1-SNAPSHOT</tomcat.version>
+    </properties>
+
+    <scm>
+        <connection>scm:git:https://gitbox.apache.org/repos/asf/tomcat.git</connection>
+        <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/tomcat.git</developerConnection>
+        <url>https://gitbox.apache.org/repos/asf?p=tomcat.git</url>
+        <tag>HEAD</tag>
+    </scm>
+
+	<mailingLists>
+		<mailingList>
+			<name>Development List</name>
+			<subscribe>dev-subscribe@tomcat.apache.org</subscribe>
+			<unsubscribe>dev-unsubscribe@tomcat.apache.org</unsubscribe>
+			<post>dev@tomcat.apache.org</post>
+		</mailingList>
+		<mailingList>
+			<name>Users List</name>
+			<subscribe>users-subscribe@tomcat.apache.org</subscribe>
+			<unsubscribe>users-unsubscribe@tomcat.apache.org</unsubscribe>
+			<post>users@tomcat.apache.org</post>
+		</mailingList>
+	</mailingLists>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-catalina</artifactId>
+            <version>${tomcat.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tomcat</groupId>
+            <artifactId>tomcat-coyote</artifactId>
+            <version>${tomcat.version}</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>19</source>
+					<target>19</target>
+					<compilerArgs>
+						<arg>--enable-preview</arg>
+					</compilerArgs>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-javadoc-plugin</artifactId>
+				<configuration>
+				    <source>19</source> 
+					<additionalJOptions>
+						<additionalJOption>--enable-preview</additionalJOption>
+					</additionalJOptions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>
diff --git a/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java b/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java
new file mode 100644
index 0000000000..9b6efddac6
--- /dev/null
+++ b/modules/loom/src/main/java/org/apache/coyote/http11/Http11BioLoomProtocol.java
@@ -0,0 +1,35 @@
+/*
+ *  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.
+ */
+package org.apache.coyote.http11;
+
+/**
+ * Dummy implementation for now that just extends the standard NIO
+ * implementation.
+ */
+public class Http11BioLoomProtocol extends Http11NioProtocol {
+
+    // ----------------------------------------------------- JMX related methods
+
+    @Override
+    protected String getNamePrefix() {
+        if (isSSLEnabled()) {
+            return "https-" + getSslImplementationShortName()+ "-bio-loom";
+        } else {
+            return "http-bio-loom";
+        }
+    }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org