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 e6de7741409..1901c7149b6 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 @@ + + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.4 + + + org.apache.felix maven-bundle-plugin + 5.1.9 true 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 cdeb46977ea..00000000000 --- 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 ef371b43bdc..fb1bdc87b91 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 542c635afe1..00000000000 --- 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 d57c8dd8476..4c8956d1f6e 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"));