This is an automated email from the ASF dual-hosted git repository. yuanbo pushed a commit to branch TUBEMQ-421 in repository https://gitbox.apache.org/repos/asf/incubator-tubemq.git
commit df95aac3aec661c43e502084b02713bad1d5f182 Author: EMsnap <[email protected]> AuthorDate: Thu Dec 3 17:40:37 2020 -0800 [TUBEMQ-440] Add feature package tube-manager to zip (#337) --- tubemq-manager/conf/logback.xml | 64 +++++++++++++++++++++++++++ tubemq-manager/pom.xml | 31 ++++++++++++- tubemq-manager/src/main/assembly/assembly.xml | 61 +++++++++++++++++++++++++ 3 files changed, 154 insertions(+), 2 deletions(-) diff --git a/tubemq-manager/conf/logback.xml b/tubemq-manager/conf/logback.xml new file mode 100644 index 0000000..3e4259f --- /dev/null +++ b/tubemq-manager/conf/logback.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. +--> +<configuration> + <property name="FILE_ERROR_PATTERN" + value="${FILE_LOG_PATTERN:-%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} %file:%line: %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> + <include resource="org/springframework/boot/logging/logback/defaults.xml"/> + <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>INFO</level> + </filter> + <encoder> + <pattern>${CONSOLE_LOG_PATTERN}</pattern> + <charset>UTF-8</charset> + </encoder> + </appender> + + <appender name="FILE_INFO" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <FileNamePattern>../logs/tubemq-manager.info.%d{yyyy-MM-dd}.part_%i.log</FileNamePattern> + <maxHistory>10</maxHistory> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>100MB</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + </rollingPolicy> + <encoder> + <pattern>${FILE_LOG_PATTERN}</pattern> + <charset>UTF-8</charset> + </encoder> + </appender> + + <appender name="FILE_ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender"> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <FileNamePattern>../logs/tubemq-manager.error.%d{yyyy-MM-dd}.part_%i.log</FileNamePattern> + <maxHistory>10</maxHistory> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>100MB</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + </rollingPolicy> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>Error</level> + </filter> + <encoder> + <pattern>${FILE_ERROR_PATTERN}</pattern> + <charset>UTF-8</charset> + </encoder> + </appender> + + <root level="info"> + <appender-ref ref="FILE_INFO"/> + <appender-ref ref="FILE_ERROR"/> + </root> +</configuration> diff --git a/tubemq-manager/pom.xml b/tubemq-manager/pom.xml index b5bf2d7..1fa0994 100644 --- a/tubemq-manager/pom.xml +++ b/tubemq-manager/pom.xml @@ -111,8 +111,35 @@ <build> <plugins> <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <version>3.3.0</version> + <configuration> + <descriptors> + <descriptor>src/main/assembly/assembly.xml</descriptor> + </descriptors> + <archive> + <manifest> + <mainClass>com.cyy.MvnPackageApplication</mainClass> + </manifest> + </archive> + </configuration> + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <finalName>${project.artifactId}</finalName> + <descriptors> + <descriptor>src/main/assembly/assembly.xml</descriptor> + </descriptors> + <outputDirectory>./dist/</outputDirectory> + </configuration> + </execution> + </executions> </plugin> </plugins> </build> diff --git a/tubemq-manager/src/main/assembly/assembly.xml b/tubemq-manager/src/main/assembly/assembly.xml new file mode 100644 index 0000000..82a8b8a --- /dev/null +++ b/tubemq-manager/src/main/assembly/assembly.xml @@ -0,0 +1,61 @@ +<!-- + 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. +--> +<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> + <id>bin</id> + <formats> + <format>zip</format> + </formats> + <dependencySets> + <dependencySet> + <useProjectArtifact>false</useProjectArtifact> + <outputDirectory>lib</outputDirectory> + </dependencySet> + </dependencySets> + <fileSets> + <fileSet> + <directory>bin</directory> + <outputDirectory>/bin</outputDirectory> + <includes> + <include>*.sh</include> + <include>*.bat</include> + </includes> + </fileSet> + <fileSet> + <directory>conf</directory> + <outputDirectory>/conf</outputDirectory> + <includes> + <include>*.xml</include> + <include>*.properties</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/resources</directory> + <outputDirectory>/conf</outputDirectory> + <includes> + <include>*.xml</include> + <include>*.properties</include> + </includes> + </fileSet> + <fileSet> + <directory>target</directory> + <includes> + <include>tubemq-manager-*.jar</include> + </includes> + <outputDirectory>/lib</outputDirectory> + </fileSet> + + </fileSets> +</assembly> \ No newline at end of file
