You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2026/08/28 18:14:49 UTC
(maven-compiler-plugin) branch MCOMPILER-598-textblock-regression-it created (now f34ab40e)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a change to branch MCOMPILER-598-textblock-regression-it
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git
at f34ab40e [MCOMPILER-598] Add regression test for text blocks with unescaped quotes
This branch includes the following new commits:
new f34ab40e [MCOMPILER-598] Add regression test for text blocks with unescaped quotes
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(maven-compiler-plugin) 01/01: [MCOMPILER-598] Add regression test for text blocks with unescaped quotes
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch MCOMPILER-598-textblock-regression-it
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git
commit f34ab40e14c97dd822d4072eced587df23e9358c
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Fri Aug 28 18:13:36 2026 +0000
[MCOMPILER-598] Add regression test for text blocks with unescaped quotes
The source module parser used to parse every source file in the source
folder with qdox. Text blocks containing unescaped double quotes made
qdox fail with a ParseException, e.g. syntax error @[9,2] in
.../ServiceImpl.java.
Regression test verifies that a modular project with a service provider
class containing such a text block compiles.
---
src/it/MCOMPILER-598/invoker.properties | 18 +++++++++
src/it/MCOMPILER-598/pom.xml | 46 ++++++++++++++++++++++
.../MCOMPILER-598/src/main/java/module-info.java | 24 +++++++++++
.../src/main/java/org/example/Service.java | 21 ++++++++++
.../src/main/java/org/example/ServiceImpl.java | 26 ++++++++++++
src/it/MCOMPILER-598/verify.groovy | 25 ++++++++++++
6 files changed, 160 insertions(+)
diff --git a/src/it/MCOMPILER-598/invoker.properties b/src/it/MCOMPILER-598/invoker.properties
new file mode 100644
index 00000000..b3f3090e
--- /dev/null
+++ b/src/it/MCOMPILER-598/invoker.properties
@@ -0,0 +1,18 @@
+# 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.
+
+invoker.java.version = 17+
\ No newline at end of file
diff --git a/src/it/MCOMPILER-598/pom.xml b/src/it/MCOMPILER-598/pom.xml
new file mode 100644
index 00000000..d04abd29
--- /dev/null
+++ b/src/it/MCOMPILER-598/pom.xml
@@ -0,0 +1,46 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.maven.plugins.compiler.it</groupId>
+ <artifactId>MCOMPILER-598</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>MCOMPILER-598</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>@project.version@</version>
+ <configuration>
+ <release>17</release>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
diff --git a/src/it/MCOMPILER-598/src/main/java/module-info.java b/src/it/MCOMPILER-598/src/main/java/module-info.java
new file mode 100644
index 00000000..fc34d690
--- /dev/null
+++ b/src/it/MCOMPILER-598/src/main/java/module-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+module org.example {
+ exports org.example;
+
+ provides org.example.Service with
+ org.example.ServiceImpl;
+}
diff --git a/src/it/MCOMPILER-598/src/main/java/org/example/Service.java b/src/it/MCOMPILER-598/src/main/java/org/example/Service.java
new file mode 100644
index 00000000..9aec8b17
--- /dev/null
+++ b/src/it/MCOMPILER-598/src/main/java/org/example/Service.java
@@ -0,0 +1,21 @@
+/*
+ * 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.example;
+
+public interface Service {}
diff --git a/src/it/MCOMPILER-598/src/main/java/org/example/ServiceImpl.java b/src/it/MCOMPILER-598/src/main/java/org/example/ServiceImpl.java
new file mode 100644
index 00000000..9dca4522
--- /dev/null
+++ b/src/it/MCOMPILER-598/src/main/java/org/example/ServiceImpl.java
@@ -0,0 +1,26 @@
+/*
+ * 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.example;
+
+public class ServiceImpl implements Service {
+
+ private static final String URL = """
+ "http://freedesktop.org"
+ """;
+}
diff --git a/src/it/MCOMPILER-598/verify.groovy b/src/it/MCOMPILER-598/verify.groovy
new file mode 100644
index 00000000..ebd7ce38
--- /dev/null
+++ b/src/it/MCOMPILER-598/verify.groovy
@@ -0,0 +1,25 @@
+/*
+ * 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.
+ */
+
+File target = new File( basedir, "target" );
+assert target.isDirectory()
+
+assert new File( target, "classes/module-info.class" ).exists()
+assert new File( target, "classes/org/example/Service.class" ).exists()
+assert new File( target, "classes/org/example/ServiceImpl.class" ).exists()
\ No newline at end of file