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

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


The following commit(s) were added to refs/heads/main by this push:
     new 3b067c9dc0 Use single file generation to avoid verify race condition 
(#2285)
3b067c9dc0 is described below

commit 3b067c9dc0c4b26bcd4c31d78702c9a0d2a44b93
Author: JB Onofré <[email protected]>
AuthorDate: Wed Feb 18 14:34:21 2026 +0100

    Use single file generation to avoid verify race condition (#2285)
---
 .../test-markdown/pom.xml                          | 10 ++++++
 .../src/main/java/test/BarCommand.java             | 38 ----------------------
 .../test-markdown/src/main/resources/commands.md   |  1 -
 .../test-markdown/src/main/resources/test-bar.md   | 24 --------------
 .../src/it/test-commands-generate-help/verify.bsh  | 10 ++----
 5 files changed, 13 insertions(+), 70 deletions(-)

diff --git 
a/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/pom.xml
 
b/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/pom.xml
index e6de774140..1901c7149b 100644
--- 
a/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/pom.xml
+++ 
b/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/pom.xml
@@ -46,10 +46,20 @@
     </dependencies>
 
     <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-deploy-plugin</artifactId>
+                    <version>3.1.4</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
         <plugins>
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
+                <version>5.1.9</version>
                 <extensions>true</extensions>
             </plugin>
             <plugin>
diff --git 
a/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/src/main/java/test/BarCommand.java
 
b/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/src/main/java/test/BarCommand.java
deleted file mode 100644
index cdeb46977e..0000000000
--- 
a/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/src/main/java/test/BarCommand.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 test;
-
-import org.apache.karaf.shell.api.action.Action;
-import org.apache.karaf.shell.api.action.Argument;
-import org.apache.karaf.shell.api.action.Command;
-
-@Command(scope = "test", name = "bar", description = "Test Bar")
-public class BarCommand implements Action {
-
-    @Argument(index = 0, name = "arg1", description = "Arg1 description")
-    String arg1;
-
-    @Argument(index = 1, name = "arg2", description = "Arg2 description")
-    String arg2;
-
-    public Object execute() throws Exception {
-        return null;
-    }
-}
diff --git 
a/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/src/main/resources/commands.md
 
b/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/src/main/resources/commands.md
index ef371b43bd..fb1bdc87b9 100644
--- 
a/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/src/main/resources/commands.md
+++ 
b/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/src/main/resources/commands.md
@@ -2,6 +2,5 @@
 
 ## test
 
-- [test:bar|test-bar]
 - [test:foo|test-foo]
 
diff --git 
a/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/src/main/resources/test-bar.md
 
b/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/src/main/resources/test-bar.md
deleted file mode 100644
index 542c635afe..0000000000
--- 
a/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/test-markdown/src/main/resources/test-bar.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# test:bar
-
-# Description
-
-Test Bar
-
-# Syntax
-
-test:bar [options] [arg1] [arg2] 
-
-# Arguments
-
-| Name | Description |
-|------|-------------|
-| arg1 | Arg1 description |
-| arg2 | Arg2 description |
-
-# Options
-
-| Name | Description |
-|------|-------------|
-| --help | Display this help message |
-
-
diff --git 
a/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/verify.bsh 
b/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/verify.bsh
index d57c8dd847..4c8956d1f6 100644
--- a/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/verify.bsh
+++ b/tooling/karaf-maven-plugin/src/it/test-commands-generate-help/verify.bsh
@@ -45,9 +45,7 @@ boolean compareFiles(File file1, File file2) throws 
IOException {
 
         if (bf2.readLine() == null) {
             return true;
-        }
-
-        else {
+        } else {
             return false;
         }
 
@@ -59,12 +57,10 @@ boolean compareFiles(File file1, File file2) throws 
IOException {
 
 File overviewFile = new File(basedir, 
"test-markdown/target/docbkx/sources/commands.md");
 File fooCommandFile = new File(basedir, 
"test-markdown/target/docbkx/sources/test-foo.md");
-File barCommandFile = new File(basedir, 
"test-markdown/target/docbkx/sources/test-bar.md");
 
-if (!barCommandFile.exists() || !fooCommandFile.exists() || 
!overviewFile.exists()) {
+if (!fooCommandFile.exists() || !overviewFile.exists()) {
     throw new FileNotFoundException("Not all expected documentation was 
generated!");
 }
 
 return compareFiles(overviewFile, new File(basedir, 
"test-markdown/src/main/resources/commands.md"))
-    && compareFiles(fooCommandFile, new File(basedir, 
"test-markdown/src/main/resources/test-foo.md"))
-    && compareFiles(barCommandFile, new File(basedir, 
"test-markdown/src/main/resources/test-bar.md"));
+    && compareFiles(fooCommandFile, new File(basedir, 
"test-markdown/src/main/resources/test-foo.md"));

Reply via email to