Repository: incubator-ratis Updated Branches: refs/heads/master ce3afb08f -> 83e5d99e5
RATIS-174. Create binary package for the release. Contributed by Elek, Marton Project: http://git-wip-us.apache.org/repos/asf/incubator-ratis/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ratis/commit/83e5d99e Tree: http://git-wip-us.apache.org/repos/asf/incubator-ratis/tree/83e5d99e Diff: http://git-wip-us.apache.org/repos/asf/incubator-ratis/diff/83e5d99e Branch: refs/heads/master Commit: 83e5d99e509835318d7d794d5bab83e37670e088 Parents: ce3afb0 Author: Tsz-Wo Nicholas Sze <[email protected]> Authored: Fri Dec 22 12:19:12 2017 +0800 Committer: Tsz-Wo Nicholas Sze <[email protected]> Committed: Fri Dec 22 12:19:12 2017 +0800 ---------------------------------------------------------------------- ratis-assembly/pom.xml | 10 ++- ratis-assembly/src/main/assembly/bin.xml | 79 ++++++++++++++++++++++++ ratis-assembly/src/main/assembly/src.xml | 3 +- ratis-assembly/src/main/resources/README.md | 30 +++++++++ ratis-examples/src/main/bin/client.sh | 0 ratis-examples/src/main/bin/common.sh | 16 +++-- ratis-examples/src/main/bin/server.sh | 0 ratis-examples/src/main/bin/start-all.sh | 0 8 files changed, 131 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/83e5d99e/ratis-assembly/pom.xml ---------------------------------------------------------------------- diff --git a/ratis-assembly/pom.xml b/ratis-assembly/pom.xml index c7a6f03..4dc31f8 100644 --- a/ratis-assembly/pom.xml +++ b/ratis-assembly/pom.xml @@ -97,12 +97,13 @@ <artifactId>maven-assembly-plugin</artifactId> <configuration> <!--Else will use ratis-assembly as final name.--> - <finalName>ratis-${project.version}</finalName> + <finalName>ratis-incubator-${project.version}</finalName> <skipAssembly>false</skipAssembly> <appendAssemblyId>true</appendAssemblyId> <tarLongFileMode>gnu</tarLongFileMode> <descriptors> - <descriptor>src/main/assembly/src.xml/</descriptor> + <descriptor>src/main/assembly/src.xml</descriptor> + <descriptor>src/main/assembly/bin.xml</descriptor> </descriptors> </configuration> </plugin> @@ -140,6 +141,11 @@ </dependency> <dependency> + <artifactId>ratis-examples</artifactId> + <groupId>org.apache.ratis</groupId> + </dependency> + + <dependency> <artifactId>ratis-common</artifactId> <groupId>org.apache.ratis</groupId> </dependency> http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/83e5d99e/ratis-assembly/src/main/assembly/bin.xml ---------------------------------------------------------------------- diff --git a/ratis-assembly/src/main/assembly/bin.xml b/ratis-assembly/src/main/assembly/bin.xml new file mode 100644 index 0000000..0cc8b3c --- /dev/null +++ b/ratis-assembly/src/main/assembly/bin.xml @@ -0,0 +1,79 @@ +<?xml version="1.0"?> +<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd"> + <!-- + /** + * 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. + */ + --> + <id>bin</id> + <formats> + <format>tar.gz</format> + </formats> + <moduleSets> + <moduleSet> + <useAllReactorProjects>true</useAllReactorProjects> + <includes> + <include>org.apache.ratis:ratis-examples</include> + </includes> + <binaries> + <outputDirectory>examples/lib</outputDirectory> + <includeDependencies>false</includeDependencies> + <unpack>false</unpack> + </binaries> + </moduleSet> + <moduleSet> + <useAllReactorProjects>true</useAllReactorProjects> + <includes> + <include>org.apache.ratis:ratis-assembly</include> + <include>org.apache.ratis:ratis-client</include> + <include>org.apache.ratis:ratis-common</include> + <include>org.apache.ratis:ratis-grpc</include> + <include>org.apache.ratis:ratis-hadoop</include> + <include>org.apache.ratis:ratis-netty</include> + <include>org.apache.ratis:ratis-replicated-map</include> + <include>org.apache.ratis:ratis-server</include> + </includes> + <binaries> + <outputDirectory>jars</outputDirectory> + <includeDependencies>false</includeDependencies> + <unpack>false</unpack> + </binaries> + </moduleSet> + </moduleSets> + <fileSets> + <fileSet> + <directory>${project.basedir}/..</directory> + <outputDirectory>.</outputDirectory> + <includes> + <include>DISCLAIMER.txt</include> + <include>LICENSE.txt</include> + <include>NOTICE.txt</include> + </includes> + <fileMode>0644</fileMode> + </fileSet> + <fileSet> + <directory>${project.basedir}/../ratis-examples/src/main/bin</directory> + <outputDirectory>examples/bin</outputDirectory> + <includes> + <include>*.*</include> + </includes> + <fileMode>755</fileMode> + </fileSet> + </fileSets> +</assembly> http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/83e5d99e/ratis-assembly/src/main/assembly/src.xml ---------------------------------------------------------------------- diff --git a/ratis-assembly/src/main/assembly/src.xml b/ratis-assembly/src/main/assembly/src.xml index 9802242..cc2ab80 100644 --- a/ratis-assembly/src/main/assembly/src.xml +++ b/ratis-assembly/src/main/assembly/src.xml @@ -19,7 +19,7 @@ * limitations under the License. */ --> - <id>release</id> + <id>src</id> <formats> <format>tar.gz</format> </formats> @@ -105,6 +105,7 @@ <include>NOTICE.txt</include> <include>README.md</include> <include>pom.xml</include> + <include>start-build-env.sh</include> </includes> <fileMode>0644</fileMode> </fileSet> http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/83e5d99e/ratis-assembly/src/main/resources/README.md ---------------------------------------------------------------------- diff --git a/ratis-assembly/src/main/resources/README.md b/ratis-assembly/src/main/resources/README.md new file mode 100644 index 0000000..c762f03 --- /dev/null +++ b/ratis-assembly/src/main/resources/README.md @@ -0,0 +1,30 @@ +<!-- + Licensed 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. See accompanying LICENSE file. +--> + +# Apache Ratis + +This is the binary distribution of Apache Ratis. + +Apache Ratis is a java library that implements the RAFT protocol. + +First of all: it's a library. To use it use java dependency management tool (such as maven and gradle). +The required artifacts are available from the maven central or the apache nexus under the org.apache.ratis groupId. + +This distribution also includes some example raft server in the examples directory which includes an example +implementation of the key raft elements: raftlog and state machine. The are for demonstration purposes only. + + +For more deails see: + +https://ratis.incubator.apache.org http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/83e5d99e/ratis-examples/src/main/bin/client.sh ---------------------------------------------------------------------- diff --git a/ratis-examples/src/main/bin/client.sh b/ratis-examples/src/main/bin/client.sh old mode 100644 new mode 100755 http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/83e5d99e/ratis-examples/src/main/bin/common.sh ---------------------------------------------------------------------- diff --git a/ratis-examples/src/main/bin/common.sh b/ratis-examples/src/main/bin/common.sh old mode 100644 new mode 100755 index d00eb1e..0bcaea2 --- a/ratis-examples/src/main/bin/common.sh +++ b/ratis-examples/src/main/bin/common.sh @@ -16,8 +16,16 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -ARTIFACT=`ls -1 $DIR/../../../target/ratis-examples-*.jar | grep -v test` -if [ ! -f "$ARTIFACT" ]; then - echo "Jar file is missing. Please do a full build (mvn clean package) first." - exit -1 +LIBDIR="$DIR/../lib" + +if [ -d "$LIBDIR" ]; then + ARTIFACT=`ls -1 $DIR/../lib/*.jar` +else +#development startup + ARTIFACT=`ls -1 $DIR/../../../target/ratis-examples-*.jar | grep -v test | grep -v javadoc | grep -v sources` + echo $ARTIFACT + if [ ! -f "$ARTIFACT" ]; then + echo "Jar file is missing. Please do a full build (mvn clean package) first." + exit -1 + fi fi \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/83e5d99e/ratis-examples/src/main/bin/server.sh ---------------------------------------------------------------------- diff --git a/ratis-examples/src/main/bin/server.sh b/ratis-examples/src/main/bin/server.sh old mode 100644 new mode 100755 http://git-wip-us.apache.org/repos/asf/incubator-ratis/blob/83e5d99e/ratis-examples/src/main/bin/start-all.sh ---------------------------------------------------------------------- diff --git a/ratis-examples/src/main/bin/start-all.sh b/ratis-examples/src/main/bin/start-all.sh old mode 100644 new mode 100755
