Skip to content

Commit

Permalink
Aggregate packaging specific files to a new sub-module: distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhanhui authored and dongeforever committed Jun 6, 2017
1 parent aa694f2 commit e0d4a50
Show file tree
Hide file tree
Showing 59 changed files with 202 additions and 74 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ devenv
*.iml
.idea/
*.versionsBackup
*bin
!NOTICE-BIN
!LICENSE-BIN
.DS_Store
.DS_Store
34 changes: 17 additions & 17 deletions BUILDING
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
Build instructions for RocketMQ
Build Instructions for Apache RocketMQ

====================================================

(1) Requisites
(1) Prerequisites

JDK 1.7+ is required in order to compile and run RocketMQ.
JDK 1.7+ is required in order to compile and run RocketMQ.

RocketMQ utilizes Maven as a distribution management and packaging tool. Version 3.0.3 or later is required.
Maven installation and configuration instructions can be found here:
RocketMQ utilizes Maven as a distribution management and packaging tool. Version 3.0.3 or later is required.
Maven installation and configuration instructions can be found here:

http://maven.apache.org/run-maven/index.html
http://maven.apache.org/run-maven/index.html


(2) Executing test cases
(2) Run test cases

Execute the following command in order to compile and test the components:
Execute the following command in order to compile and run test cases of each components:

$ mvn test
$ mvn test


(3) Importing projects to eclipse
(3) Import projects to Eclipse IDE

First, generate eclipse project files:
First, generate eclipse project files:

$ mvn -U eclipse:eclipse
$ mvn -U eclipse:eclipse

Then, import to eclipse by specifying the root directory of the project via:
Then, import to eclipse by specifying the root directory of the project via:

[File] > [Import] > [Existing Projects into Workspace].
[File] > [Import] > [Existing Projects into Workspace].


(4) Building packages
(4) Build distribution packages

Execute the following command in order to build the tar.gz packages and install JAR to the local repository:
Execute the following command in order to build the tar.gz packages and install JAR into local repository:

$ mvn clean install -Prelease-all assembly:assembly -U
$ mvn -Prelease-all -DskipTests clean package install -U
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions distribution/bin/runbroker
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License. You may obtain a copy of the License at
rem
rem http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
125 changes: 125 additions & 0 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-all</artifactId>
<version>4.1.0-incubating-SNAPSHOT</version>
</parent>
<artifactId>rocketmq-distribution</artifactId>
<name>rocketmq-distribution ${project.version}</name>
<packaging>pom</packaging>

<profiles>

<profile>
<id>release-all</id>

<dependencies>
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-broker</artifactId>
</dependency>

<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-client</artifactId>
</dependency>

<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-filtersrv</artifactId>
</dependency>

<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-tools</artifactId>
</dependency>

<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-example</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>release-all</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>release.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>apache-rocketmq</finalName>
</build>
</profile>

<profile>
<id>release-client</id>

<dependencies>
<dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-client</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>release-client</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>release-client.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>apache-rocketmq</finalName>
</build>
</profile>
</profiles>

</project>
18 changes: 9 additions & 9 deletions release-client.xml → distribution/release-client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,21 @@
See the License for the specific language governing permissions and
limitations under the License.
-->

<assembly>
<id>client</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
<format>tar.gz</format>
</formats>
<fileSets>
<fileSet>
<includes>
<include>DISCLAIMER</include>
<include>README.md</include>
</includes>
</fileSet>
</fileSets>

<fileSet>
<directory>../</directory>
<includes>
<include>DISCLAIMER</include>
<include>README.md</include>
</includes>
</fileSet>

<files>
<file>
Expand All @@ -45,6 +44,7 @@

<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>org.apache.rocketmq:rocketmq-client</include>
</includes>
Expand Down
20 changes: 16 additions & 4 deletions release.xml → distribution/release.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-->

<assembly>
<id>all</id>
<includeBaseDirectory>false</includeBaseDirectory>
Expand All @@ -25,14 +24,26 @@
</formats>
<fileSets>
<fileSet>
<directory>../</directory>
<includes>
<include>bin/*</include>
<include>conf/**</include>
<include>benchmark/*</include>
<include>DISCLAIMER</include>
<include>README.md</include>
</includes>
</fileSet>

<fileSet>
<includes>
<include>conf/**</include>
<include>benchmark/*</include>
</includes>
</fileSet>

<fileSet>
<includes>
<include>bin/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>

<files>
Expand All @@ -48,6 +59,7 @@

<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>org.apache.rocketmq:rocketmq-broker</include>
<include>org.apache.rocketmq:rocketmq-tools</include>
Expand Down
48 changes: 14 additions & 34 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
<module>filtersrv</module>
<module>srvutil</module>
<module>test</module>
<module>distribution</module>
</modules>

<build>
Expand Down Expand Up @@ -380,6 +381,14 @@
<version>3.0.2</version>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>

<profiles>
Expand Down Expand Up @@ -438,40 +447,6 @@
</plugins>
</build>
</profile>
<profile>
<id>release-all</id>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<configuration>
<finalName>apache-rocketmq</finalName>
<descriptors>
<descriptor>release.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release-client</id>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<configuration>
<finalName>apache-rocketmq</finalName>
<descriptors>
<descriptor>release-client.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>it-test</id>
<build>
Expand Down Expand Up @@ -578,6 +553,11 @@
<artifactId>rocketmq-srvutil</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rocketmq-example</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
Loading

0 comments on commit e0d4a50

Please sign in to comment.