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:55 UTC

(maven-compiler-plugin) branch MCOMPILER-598-textblock-regression-it-4x created (now 9fa7295a)

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

elharo pushed a change to branch MCOMPILER-598-textblock-regression-it-4x
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git


      at 9fa7295a [MCOMPILER-598] Add regression test for text blocks with unescaped quotes

This branch includes the following new commits:

     new 9fa7295a [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-4x
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git

commit 9fa7295a2adcdc300c49968512032526f819e740
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Fri Aug 28 18:14:38 2026 +0000

    [MCOMPILER-598] Add regression test for text blocks with unescaped quotes
    
    The old source module parser (plexus-java with qdox) used to parse every
    source file in the source folder. 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                       | 44 ++++++++++++++++++++++
 .../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, 158 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..7352902a
--- /dev/null
+++ b/src/it/MCOMPILER-598/pom.xml
@@ -0,0 +1,44 @@
+<?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>
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