eolivelli closed pull request #1800: Issue 1799: bkctl is broken with default build options URL: https://github.com/apache/bookkeeper/pull/1800
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/.gitignore b/.gitignore index d8778b2a75..86f2415acf 100644 --- a/.gitignore +++ b/.gitignore @@ -33,5 +33,8 @@ data/ # Pid files **/*.pid +# files are generated under following directories +tools/all/src/main/resources + # Exclude versionBackup file (generated by `mvn versions:set`) **/*.versionsBackup diff --git a/site/docs/latest/getting-started/installation.md b/site/docs/latest/getting-started/installation.md index 9986cd8e04..7e92b47158 100644 --- a/site/docs/latest/getting-started/installation.md +++ b/site/docs/latest/getting-started/installation.md @@ -44,6 +44,12 @@ Once you have the BookKeeper on your local machine, either by [downloading](#dow $ mvn package ``` +Since 4.8.0, bookkeeper introduces `table service`. If you would like to build and tryout table service, you can build it with `stream` profile. + +```shell +$ mvn package -Dstream +``` + > You can skip tests by adding the `-DskipTests` flag when running `mvn > package`. ### Useful Maven commands @@ -60,7 +66,9 @@ Command | Action `mvn verify` | Performs a wide variety of verification and validation tasks `mvn apache-rat:check` | Run Maven using the [Apache Rat](http://creadur.apache.org/rat/apache-rat-plugin/) plugin `mvn compile javadoc:aggregate` | Build Javadocs locally -`mvn package assembly:single` | Build a complete distribution using the Maven [Assembly](http://maven.apache.org/plugins/maven-assembly-plugin/) plugin +`mvn -am -pl bookkeeper-dist/server package` | Build a server distribution using the Maven [Assembly](http://maven.apache.org/plugins/maven-assembly-plugin/) plugin + +> You can enable `table service` by adding the `-Dstream` flag when running above commands. ## Package directory diff --git a/tools/all/pom.xml b/tools/all/pom.xml index 685c2e1103..9a29f6099f 100644 --- a/tools/all/pom.xml +++ b/tools/all/pom.xml @@ -1,20 +1,22 @@ <?xml version="1.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. ---> + ~ 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> <parent> @@ -27,33 +29,37 @@ <dependencies> <dependency> <groupId>org.apache.bookkeeper</groupId> - <artifactId>bookkeeper-tools-framework</artifactId> + <artifactId>bookkeeper-tools-ledger</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>org.apache.bookkeeper</groupId> - <artifactId>bookkeeper-server</artifactId> - <version>${project.parent.version}</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>org.apache.bookkeeper</groupId> - <artifactId>buildtools</artifactId> - <version>${project.parent.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.bookkeeper</groupId> - <artifactId>bookkeeper-server</artifactId> - <type>test-jar</type> - <version>${project.parent.version}</version> - <scope>test</scope> - </dependency> </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>${maven-antrun-plugin.version}</version> + <executions> + <execution> + <id>append-ledger-commands</id> + <phase>generate-resources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <target> + <concat destfile="${project.basedir}/src/main/resources/META-INF/services/org.apache.bookkeeper.tools.framework.CommandGroup" + overwrite="true"> + <filelist dir="${project.basedir}/../ledger/src/main/resources" files="commands"> + </filelist> + </concat> + </target> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> <profiles> <profile> <id>stream</id> @@ -70,6 +76,33 @@ <version>${project.version}</version> </dependency> </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>${maven-antrun-plugin.version}</version> + <executions> + <execution> + <id>append-stream-commands</id> + <phase>generate-resources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <target> + <concat destfile="${project.basedir}/src/main/resources/META-INF/services/org.apache.bookkeeper.tools.framework.CommandGroup" + append="true"> + <filelist dir="${project.basedir}/../stream/src/main/resources" files="commands"> + </filelist> + </concat> + </target> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </profile> </profiles> </project> diff --git a/tools/ledger/pom.xml b/tools/ledger/pom.xml new file mode 100644 index 0000000000..6c5182b211 --- /dev/null +++ b/tools/ledger/pom.xml @@ -0,0 +1,57 @@ +<?xml version="1.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. +--> +<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> + <parent> + <artifactId>bookkeeper-tools-parent</artifactId> + <groupId>org.apache.bookkeeper</groupId> + <version>4.9.0-SNAPSHOT</version> + </parent> + <artifactId>bookkeeper-tools-ledger</artifactId> + <name>Apache BookKeeper :: Tools :: Ledger</name> + <dependencies> + <dependency> + <groupId>org.apache.bookkeeper</groupId> + <artifactId>bookkeeper-tools-framework</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.bookkeeper</groupId> + <artifactId>bookkeeper-server</artifactId> + <version>${project.parent.version}</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.apache.bookkeeper</groupId> + <artifactId>buildtools</artifactId> + <version>${project.parent.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.bookkeeper</groupId> + <artifactId>bookkeeper-server</artifactId> + <type>test-jar</type> + <version>${project.parent.version}</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> diff --git a/tools/all/src/main/java/org/apache/bookkeeper/tools/cli/BKCtl.java b/tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/BKCtl.java similarity index 100% rename from tools/all/src/main/java/org/apache/bookkeeper/tools/cli/BKCtl.java rename to tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/BKCtl.java diff --git a/tools/all/src/main/java/org/apache/bookkeeper/tools/cli/commands/BookieCommandGroup.java b/tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/commands/BookieCommandGroup.java similarity index 100% rename from tools/all/src/main/java/org/apache/bookkeeper/tools/cli/commands/BookieCommandGroup.java rename to tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/commands/BookieCommandGroup.java diff --git a/tools/all/src/main/java/org/apache/bookkeeper/tools/cli/commands/BookiesCommandGroup.java b/tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/commands/BookiesCommandGroup.java similarity index 100% rename from tools/all/src/main/java/org/apache/bookkeeper/tools/cli/commands/BookiesCommandGroup.java rename to tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/commands/BookiesCommandGroup.java diff --git a/tools/all/src/main/java/org/apache/bookkeeper/tools/cli/commands/CookieCommandGroup.java b/tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/commands/CookieCommandGroup.java similarity index 100% rename from tools/all/src/main/java/org/apache/bookkeeper/tools/cli/commands/CookieCommandGroup.java rename to tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/commands/CookieCommandGroup.java diff --git a/tools/all/src/main/java/org/apache/bookkeeper/tools/cli/commands/LedgerCommandGroup.java b/tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/commands/LedgerCommandGroup.java similarity index 100% rename from tools/all/src/main/java/org/apache/bookkeeper/tools/cli/commands/LedgerCommandGroup.java rename to tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/commands/LedgerCommandGroup.java diff --git a/tools/all/src/main/java/org/apache/bookkeeper/tools/cli/commands/package-info.java b/tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/commands/package-info.java similarity index 100% rename from tools/all/src/main/java/org/apache/bookkeeper/tools/cli/commands/package-info.java rename to tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/commands/package-info.java diff --git a/tools/all/src/main/java/org/apache/bookkeeper/tools/cli/package-info.java b/tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/package-info.java similarity index 100% rename from tools/all/src/main/java/org/apache/bookkeeper/tools/cli/package-info.java rename to tools/ledger/src/main/java/org/apache/bookkeeper/tools/cli/package-info.java diff --git a/tools/all/src/main/resources/META-INF/services/org.apache.bookkeeper.tools.framework.CommandGroup b/tools/ledger/src/main/resources/commands similarity index 82% rename from tools/all/src/main/resources/META-INF/services/org.apache.bookkeeper.tools.framework.CommandGroup rename to tools/ledger/src/main/resources/commands index 0147eca5e6..7ea146b782 100644 --- a/tools/all/src/main/resources/META-INF/services/org.apache.bookkeeper.tools.framework.CommandGroup +++ b/tools/ledger/src/main/resources/commands @@ -20,7 +20,3 @@ org.apache.bookkeeper.tools.cli.commands.BookieCommandGroup org.apache.bookkeeper.tools.cli.commands.BookiesCommandGroup org.apache.bookkeeper.tools.cli.commands.CookieCommandGroup org.apache.bookkeeper.tools.cli.commands.LedgerCommandGroup -org.apache.bookkeeper.stream.cli.ClusterCommandGroup -org.apache.bookkeeper.stream.cli.NamespaceCommandGroup -org.apache.bookkeeper.stream.cli.TableAdminCommandGroup -org.apache.bookkeeper.stream.cli.TableCommandGroup diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookie/LastMarkCommandTest.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookie/LastMarkCommandTest.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookie/LastMarkCommandTest.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookie/LastMarkCommandTest.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookies/ListBookiesCommandTest.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookies/ListBookiesCommandTest.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookies/ListBookiesCommandTest.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/bookies/ListBookiesCommandTest.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/client/SimpleTestCommandTest.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/client/SimpleTestCommandTest.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/client/SimpleTestCommandTest.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/client/SimpleTestCommandTest.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/CreateCookieCommandTest.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/CreateCookieCommandTest.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/CreateCookieCommandTest.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/CreateCookieCommandTest.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/DeleteCookieCommandTest.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/DeleteCookieCommandTest.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/DeleteCookieCommandTest.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/DeleteCookieCommandTest.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/GenerateCookieCommandTest.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/GenerateCookieCommandTest.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/GenerateCookieCommandTest.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/GenerateCookieCommandTest.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/GetCookieCommandTest.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/GetCookieCommandTest.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/GetCookieCommandTest.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/GetCookieCommandTest.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/UpdateCookieCommandTest.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/UpdateCookieCommandTest.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/UpdateCookieCommandTest.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/commands/cookie/UpdateCookieCommandTest.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/BookieCommandTestBase.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/BookieCommandTestBase.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/BookieCommandTestBase.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/BookieCommandTestBase.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/BookieShellCommandTest.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/BookieShellCommandTest.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/BookieShellCommandTest.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/BookieShellCommandTest.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/ClientCommandTest.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/ClientCommandTest.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/ClientCommandTest.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/ClientCommandTest.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/ClientCommandTestBase.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/ClientCommandTestBase.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/ClientCommandTestBase.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/ClientCommandTestBase.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CommandTestBase.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CommandTestBase.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CommandTestBase.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CommandTestBase.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CookieCommandTestBase.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CookieCommandTestBase.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CookieCommandTestBase.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/CookieCommandTestBase.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTest.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTest.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTest.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTest.java diff --git a/tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTestBase.java b/tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTestBase.java similarity index 100% rename from tools/all/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTestBase.java rename to tools/ledger/src/test/java/org/apache/bookkeeper/tools/cli/helpers/DiscoveryCommandTestBase.java diff --git a/tools/all/src/test/resources/log4j.properties b/tools/ledger/src/test/resources/log4j.properties similarity index 100% rename from tools/all/src/test/resources/log4j.properties rename to tools/ledger/src/test/resources/log4j.properties diff --git a/tools/pom.xml b/tools/pom.xml index 2981bbb022..c538a6a9e0 100644 --- a/tools/pom.xml +++ b/tools/pom.xml @@ -27,6 +27,7 @@ <packaging>pom</packaging> <modules> <module>framework</module> + <module>ledger</module> <module>all</module> </modules> <profiles> diff --git a/tools/stream/src/main/resources/commands b/tools/stream/src/main/resources/commands new file mode 100644 index 0000000000..070efbfe44 --- /dev/null +++ b/tools/stream/src/main/resources/commands @@ -0,0 +1,22 @@ +# +# 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. +# + +org.apache.bookkeeper.stream.cli.ClusterCommandGroup +org.apache.bookkeeper.stream.cli.NamespaceCommandGroup +org.apache.bookkeeper.stream.cli.TableAdminCommandGroup +org.apache.bookkeeper.stream.cli.TableCommandGroup ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services