Skip to content

Commit fa78ba9

Browse files
committed
BOOKKEEPER-128: pom and script modifications required for generating release packages (ivank)
git-svn-id: https://svn.apache.org/repos/asf/zookeeper/bookkeeper/trunk@1208358 13f79535-47bb-0310-9956-ffa450edef68
1 parent 49aa4df commit fa78ba9

File tree

9 files changed

+243
-38
lines changed

9 files changed

+243
-38
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ IMPROVEMENTS:
144144

145145
BOOKKEEPER-102: Make bookkeeper use ZK from temporary repo (ivank)
146146

147+
BOOKKEEPER-128: pom and script modifications required for generating release packages (ivank)
148+
147149
hedwig-client/
148150

149151
BOOKKEEPER-44: Reuse publish channel to default server to avoid too many connect requests to default server when lots of producers came in same time (Sijie Guo via breed)

README

Lines changed: 84 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,85 @@
1-
Hedwig is a large scale pub/sub system built on top of ZooKeeper and BookKeeper.
1+
Build instructions for BookKeeper
22

3-
For documentation on building, setting up, and using Hedwig see the `doc` directory.
3+
-------------------------------------------------------------------------------
4+
Requirements:
5+
6+
* Unix System
7+
* JDK 1.6
8+
* Maven 3.0
9+
* Autotools (if compiling native hedwig client)
10+
* Internet connection for first build (to fetch all dependencies)
11+
12+
-------------------------------------------------------------------------------
13+
The BookKeeper project contains:
14+
15+
- bookkeeper-server (BookKeeper server and client)
16+
- bookkeeper-benchmark (Benchmark suite for testing BookKeeper performance)
17+
- hedwig-protocol (Hedwig network protocol)
18+
- hedwig-client (Hedwig client library)
19+
- hedwig-server (Hedwig server)
20+
21+
BookKeeper is a system to reliably log streams of records. It is designed to
22+
store write ahead logs, such as those found in database or database like
23+
applications.
24+
25+
Hedwig is a publish-subscribe system designed to carry large amounts of data
26+
across the internet in a guaranteed-delivery fashion from those who produce
27+
it (publishers) to those who are interested in it (subscribers).
28+
29+
--------------------------------------------------------------------------------
30+
How do I build?
31+
32+
BookKeeper uses maven as its build system. To build, run "mvn package" from the
33+
top-level directory, or from within any of the submodules.
34+
35+
Useful maven commands are:
36+
37+
* Clean : mvn clean
38+
* Compile : mvn compile
39+
* Run tests : mvn test
40+
* Create JAR : mvn package
41+
* Run findbugs : mvn compile findbugs:findbugs
42+
* Install JAR in M2 cache : mvn install
43+
* Deploy JAR to Maven repo : mvn deploy
44+
* Run Rat : mvn apache-rat:check
45+
* Build javadocs : mvn compile javadoc:aggregate
46+
* Build distribution : mvn package assembly:single
47+
48+
Tests options:
49+
50+
* Use -DskipTests to skip tests when running the following Maven goals:
51+
'package', 'install', 'deploy' or 'verify'
52+
* -Dtest=<TESTCLASSNAME>,<TESTCLASSNAME#METHODNAME>,....
53+
* -Dtest.exclude=<TESTCLASSNAME>
54+
* -Dtest.exclude.pattern=**/<TESTCLASSNAME1>.java,**/<TESTCLASSNAME2>.java
55+
56+
--------------------------------------------------------------------------------
57+
How do I run the services?
58+
59+
Running a Hedwig service requires a running BookKeeper service, which in turn
60+
requires a running ZooKeeper service (see http://zookeeper.apache.org). To
61+
start a bookkeeper service quickly for testing, run:
62+
63+
$ bookkeeper-server/bin/bookkeeper localbookie 10
64+
65+
This will start a standalone, ZooKeeper instance and 10 BookKeeper bookies.
66+
Note that this is only useful for testing. Data is not persisted between runs.
67+
68+
To start a real BookKeeper service, you must set up a ZooKeeper instance and
69+
run start a bookie on several machines. Modify bookkeeper-server/conf/bk_server.conf
70+
to point to your ZooKeeper instance. To start a bookie run:
71+
72+
$ bookkeeper-server/bin/bookkeeper bookie
73+
74+
Once you have at least 3 bookies runnings, you can start some Hedwig hubs. A
75+
hub is a machines which is responsible for a set of topics in the pubsub
76+
system. The service automatically distributes the topics among the hubs.
77+
To start a hedwig hub:
78+
79+
$ hedwig-server/bin/hedwig server
80+
81+
You can get more help on using these commands by running:
82+
83+
$ bookkeeper-server/bin/bookkeeper help
84+
and
85+
$ hedwig-server/bin/hedwig help

bookkeeper-server/bin/bookkeeper

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
#/**
44
# * Copyright 2007 The Apache Software Foundation

bookkeeper-server/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
<groupId>org.slf4j</groupId>
4747
<artifactId>slf4j-log4j12</artifactId>
4848
<version>1.6.4</version>
49-
<scope>test</scope>
5049
</dependency>
5150
<dependency>
5251
<groupId>org.apache.zookeeper</groupId>
@@ -86,7 +85,6 @@
8685
<groupId>log4j</groupId>
8786
<artifactId>log4j</artifactId>
8887
<version>1.2.15</version>
89-
<scope>provided</scope>
9088
<exclusions>
9189
<exclusion>
9290
<groupId>javax.mail</groupId>

hedwig-server/bin/hedwig

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/usr/bin/env bash
22
#
33
#/**
44
# * Copyright 2007 The Apache Software Foundation

hedwig-server/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
<groupId>org.slf4j</groupId>
4848
<artifactId>slf4j-log4j12</artifactId>
4949
<version>1.6.4</version>
50-
<scope>test</scope>
5150
</dependency>
5251
<dependency>
5352
<groupId>org.apache.bookkeeper</groupId>
@@ -91,7 +90,6 @@
9190
<groupId>log4j</groupId>
9291
<artifactId>log4j</artifactId>
9392
<version>1.2.15</version>
94-
<scope>provided</scope>
9593
<exclusions>
9694
<exclusion>
9795
<groupId>javax.mail</groupId>

pom.xml

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
<packaging>pom</packaging>
3232
<name>bookkeeper</name>
3333
<modules>
34-
<module>hedwig-client</module>
35-
<module>hedwig-server</module>
36-
<module>hedwig-protocol</module>
37-
<module>bookkeeper-server</module>
38-
<module>bookkeeper-benchmark</module>
34+
<module>hedwig-client</module>
35+
<module>hedwig-server</module>
36+
<module>hedwig-protocol</module>
37+
<module>bookkeeper-server</module>
38+
<module>bookkeeper-benchmark</module>
3939
</modules>
4040
<properties>
4141
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -46,35 +46,35 @@
4646
<plugins>
4747
<plugin>
4848
<artifactId>maven-compiler-plugin</artifactId>
49-
<version>2.3.2</version>
49+
<version>2.3.2</version>
5050
<configuration>
5151
<source>1.6</source>
5252
<target>1.6</target>
5353
</configuration>
5454
</plugin>
5555
<plugin>
56-
<groupId>org.apache.maven.plugins</groupId>
57-
<artifactId>maven-surefire-plugin</artifactId>
58-
<version>2.9</version>
56+
<groupId>org.apache.maven.plugins</groupId>
57+
<artifactId>maven-surefire-plugin</artifactId>
58+
<version>2.9</version>
5959
</plugin>
6060
<plugin>
6161
<groupId>org.apache.maven.plugins</groupId>
6262
<artifactId>maven-javadoc-plugin</artifactId>
6363
<version>2.8</version>
64-
<configuration>
65-
<additionalparam>-exclude org.apache.hedwig.client.netty:org.apache.hedwig.client.benchmark:org.apache.hedwig.client.data:org.apache.hedwig.client.exceptions:org.apache.hedwig.client.handlers:org.apache.hedwig.client.ssl</additionalparam>
66-
<subpackages>org.apache.bookkeeper.client:org.apache.bookkeeper.conf:org.apache.hedwig.client:org.apache.hedwig.util:org.apache.hedwig.protocol:org.apache.hedwig.exceptions</subpackages>
64+
<configuration>
65+
<additionalparam>-exclude org.apache.hedwig.client.netty:org.apache.hedwig.client.benchmark:org.apache.hedwig.client.data:org.apache.hedwig.client.exceptions:org.apache.hedwig.client.handlers:org.apache.hedwig.client.ssl</additionalparam>
66+
<subpackages>org.apache.bookkeeper.client:org.apache.bookkeeper.conf:org.apache.hedwig.client:org.apache.hedwig.util:org.apache.hedwig.protocol:org.apache.hedwig.exceptions</subpackages>
6767
<groups>
68-
<group>
68+
<group>
6969
<title>Bookkeeper</title>
70-
<packages>org.apache.bookkeeper*</packages>
70+
<packages>org.apache.bookkeeper*</packages>
7171
</group>
7272
<group>
7373
<title>Hedwig</title>
74-
<packages>org.apache.hedwig*</packages>
74+
<packages>org.apache.hedwig*</packages>
7575
</group>
76-
</groups>
77-
</configuration>
76+
</groups>
77+
</configuration>
7878
<executions>
7979
<execution>
8080
<id>aggregate</id>
@@ -86,25 +86,28 @@
8686
</executions>
8787
</plugin>
8888
<plugin>
89-
<artifactId>maven-assembly-plugin</artifactId>
89+
<artifactId>maven-assembly-plugin</artifactId>
9090
<version>2.2.1</version>
9191
<configuration>
9292
<descriptors>
93-
<descriptor>src/assemble/release.xml</descriptor>
93+
<descriptor>src/assemble/bin.xml</descriptor>
94+
<descriptor>src/assemble/src.xml</descriptor>
9495
</descriptors>
9596
</configuration>
9697
</plugin>
9798
<plugin>
98-
<groupId>org.apache.rat</groupId>
99-
<artifactId>apache-rat-plugin</artifactId>
100-
<version>0.7</version>
101-
<configuration>
102-
<excludes>
103-
<exclude>.git/**/*</exclude>
104-
<exclude>**/.svn/**/*</exclude>
105-
<exclude>CHANGES.txt</exclude>
106-
</excludes>
107-
</configuration>
99+
<groupId>org.apache.rat</groupId>
100+
<artifactId>apache-rat-plugin</artifactId>
101+
<version>0.7</version>
102+
<configuration>
103+
<excludes>
104+
<exclude>.git/**/*</exclude>
105+
<exclude>**/.svn/**/*</exclude>
106+
<exclude>CHANGES.txt</exclude>
107+
<exclude>**/README</exclude>
108+
<exclude>**/apidocs/*</exclude>
109+
</excludes>
110+
</configuration>
108111
</plugin>
109112
</plugins>
110113
</build>
@@ -115,7 +118,7 @@
115118
<plugin>
116119
<groupId>org.apache.maven.plugins</groupId>
117120
<artifactId>maven-jxr-plugin</artifactId>
118-
<version>2.1</version>
121+
<version>2.1</version>
119122
</plugin>
120123
<plugin>
121124
<groupId>org.codehaus.mojo</groupId>

src/assemble/bin.xml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
18+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
20+
<id>bin</id>
21+
<formats>
22+
<format>tar.gz</format>
23+
</formats>
24+
<includeBaseDirectory>true</includeBaseDirectory>
25+
<fileSets>
26+
<fileSet>
27+
<directory>target</directory>
28+
<outputDirectory>/</outputDirectory>
29+
<includes>
30+
<include>${project.name}-${project.version}.jar</include>
31+
</includes>
32+
</fileSet>
33+
<fileSet>
34+
<directory>conf</directory>
35+
</fileSet>
36+
<fileSet>
37+
<directory>bin</directory>
38+
<fileMode>755</fileMode>
39+
</fileSet>
40+
<fileSet>
41+
<includes>
42+
<include>${basedir}/*.txt</include>
43+
</includes>
44+
</fileSet>
45+
<fileSet>
46+
<directory>..</directory>
47+
<includes>
48+
<include>LICENSE.txt</include>
49+
<include>CHANGES.txt</include>
50+
<include>README</include>
51+
</includes>
52+
</fileSet>
53+
</fileSets>
54+
<dependencySets>
55+
<dependencySet>
56+
<outputDirectory>/lib</outputDirectory>
57+
<unpack>false</unpack>
58+
<scope>runtime</scope>
59+
</dependencySet>
60+
</dependencySets>
61+
</assembly>

src/assemble/src.xml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
18+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
20+
<id>src</id>
21+
<formats>
22+
<format>tar.gz</format>
23+
</formats>
24+
<includeBaseDirectory>true</includeBaseDirectory>
25+
<fileSets>
26+
<fileSet>
27+
<directory>.</directory>
28+
<useDefaultExcludes>true</useDefaultExcludes>
29+
<includes>
30+
<include>**/README</include>
31+
<include>**/pom.xml</include>
32+
<include>**/src/**</include>
33+
<include>**/conf/**</include>
34+
<include>**/bin/**</include>
35+
<include>**/*.txt</include>
36+
<include>doc/*</include>
37+
</includes>
38+
<excludes>
39+
<exclude>.git/**</exclude>
40+
<exclude>**/.gitignore</exclude>
41+
<exclude>**/.svn</exclude>
42+
<exclude>**/*.iws</exclude>
43+
<exclude>**/*.ipr</exclude>
44+
<exclude>**/*.iml</exclude>
45+
<exclude>**/.classpath</exclude>
46+
<exclude>**/.project</exclude>
47+
<exclude>**/.settings</exclude>
48+
<exclude>**/target/**</exclude>
49+
<!-- until the code that does this is fixed -->
50+
<exclude>**/*.log</exclude>
51+
<exclude>**/build/**</exclude>
52+
<exclude>**/file:/**</exclude>
53+
<exclude>**/SecurityAuth.audit*</exclude>
54+
</excludes>
55+
</fileSet>
56+
<fileSet>
57+
<directory>target/site/apidocs</directory>
58+
<outputDirectory>doc/apidocs</outputDirectory>
59+
</fileSet>
60+
</fileSets>
61+
</assembly>

0 commit comments

Comments
 (0)