Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#

FROM maven:3.6.1-jdk-11
FROM maven:3.6.3-jdk-8

RUN apt-get update
RUN apt-get install -y g++ cmake autoconf libcppunit-dev libtool
58 changes: 52 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>18</version>
<version>21</version>
<relativePath />
<!-- no parent resolution -->
</parent>
Expand Down Expand Up @@ -245,6 +245,12 @@
<email>fangmin@apache.org</email>
<timezone>-8</timezone>
</developer>
<developer>
<id>eolivelli</id>
<name>Enrico Olivelli</name>
<email>eolivelli@apache.org</email>
<timezone>+1</timezone>
</developer>
</developers>

<profiles>
Expand Down Expand Up @@ -517,10 +523,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<releaseProfiles>apache-release</releaseProfiles>
<arguments>-Dmaven.test.skip.exec ${arguments}</arguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.11.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -815,8 +822,47 @@
<consoleOutput>true</consoleOutput>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<!-- update the version inside the C sources -->
<preparationGoals>clean install -DskipTests antrun:run@replace-cclient-files-during-release scm:add@add-cclient-files-during-release scm:checkin@commit-cclient-files-during-release</preparationGoals>
<completionGoals>clean install -DskipTests antrun:run@replace-cclient-files-during-release scm:add@add-cclient-files-during-release scm:checkin@commit-cclient-files-during-release</completionGoals>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<id>add-cclient-files-during-release</id>
<phase>none</phase>
<goals>
<goal>add</goal>
</goals>
<configuration>
<pushChanges>false</pushChanges>
<includes>zookeeper-client/zookeeper-client-c/CMakeLists.txt,zookeeper-client/zookeeper-client-c/configure.ac,zookeeper-client/zookeeper-client-c/include/zookeeper_version.h</includes>
</configuration>
</execution>
<execution>
<id>commit-cclient-files-during-release</id>
<phase>none</phase>
<goals>
<!-- git commit -->
<goal>checkin</goal>
</goals>
<configuration>
<pushChanges>false</pushChanges>
<message>Prepared ${project.version}</message>
</configuration>
</execution>
</executions>
</plugin>
</plugins>

<resources>
<resource>
<directory>${project.basedir}src/main/java/resources</directory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
extern "C" {
#endif

#define ZOO_MAJOR_VERSION 3
#define ZOO_MINOR_VERSION 6
#define ZOO_PATCH_VERSION 0
#define ZOO_VERSION "3.6.0"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eolivelli I wonder why we make this change?


#ifdef __cplusplus
}
Expand Down
23 changes: 23 additions & 0 deletions zookeeper-client/zookeeper-client-c/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,29 @@
<goal>run</goal>
</goals>
</execution>
<execution>
<id>replace-cclient-files-during-release</id>
<phase>none</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<replaceregexp file="include/zookeeper_version.h" match="project.*" replace="project(zookeeper VERSION ${project.version})" byline="true" />
<replace file="include/zookeeper_version.h" value="">
<replaceToken>-SNAPSHOT</replaceToken>
</replace>
<replaceregexp file="CMakeLists.txt" match="project.*" replace="project(zookeeper VERSION ${project.version})" byline="true" />
<replace file="CMakeLists.txt" value="">
<replaceToken>-SNAPSHOT</replaceToken>
</replace>
<replaceregexp file="configure.ac" match="AC_INIT.*" replace="AC_INIT([zookeeper C client],${project.version},[user@zookeeper.apache.org],[zookeeper])" byline="true" />
<replace file="configure.ac" value="">
<replaceToken>-SNAPSHOT</replaceToken>
</replace>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
6 changes: 2 additions & 4 deletions zookeeper-client/zookeeper-client-c/src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,8 @@ int main(int argc, char **argv) {
" command 'verbose' later to activate debug logs in the cli shell)\n\n",
argv[0]);
fprintf(stderr,
"Version: ZooKeeper cli (c client) version %d.%d.%d\n",
ZOO_MAJOR_VERSION,
ZOO_MINOR_VERSION,
ZOO_PATCH_VERSION);
"Version: ZooKeeper cli (c client) version %s\n",
ZOO_VERSION);
return 2;
}

Expand Down