未验证 提交 fc5eadae 编写于 作者: 彭勇升 pengys 提交者: GitHub

Merge pull request #852 from hanahmily/module/apm-backend-dist

Module/apm backend dist
......@@ -6,7 +6,7 @@ set COLLECTOR_HOME=%~dp0%..
set COLLECTOR_OPTS="-Xms256M -Xmx512M -Dcollector.logDir=%COLLECTOR_HOME%\logs"
set CLASSPATH=%COLLECTOR_HOME%\config;.;
set CLASSPATH=%COLLECTOR_HOME%\libs\*;%CLASSPATH%
set CLASSPATH=%COLLECTOR_HOME%\collector-libs\*;%CLASSPATH%
if defined JAVA_HOME (
set _EXECJAVA="%JAVA_HOME:"=%"\bin\java
......
......@@ -15,7 +15,7 @@ _RUNJAVA=${JAVA_HOME}/bin/java
[ -z "$JAVA_HOME" ] && _RUNJAVA=java
CLASSPATH="$COLLECTOR_HOME/config:$CLASSPATH"
for i in "$COLLECTOR_HOME"/libs/*.jar
for i in "$COLLECTOR_HOME"/collector-libs/*.jar
do
CLASSPATH="$i:$CLASSPATH"
done
......
......@@ -2,4 +2,5 @@
setlocal
call "%~dp0"\collectorService.bat start
call "%~dp0"\webappService.bat start
endlocal
......@@ -2,6 +2,9 @@
PRG="$0"
PRGDIR=`dirname "$PRG"`
EXECUTABLE=collectorService.sh
COLLECTOR_EXE=collectorService.sh
WEBAPP_EXE=webappService.sh
exec "$PRGDIR"/"$EXECUTABLE" start
"$PRGDIR"/"$COLLECTOR_EXE"
"$PRGDIR"/"$WEBAPP_EXE"
@echo off
setlocal
set WEBAPP_PROCESS_TITLE=Skywalking-Webapp
set WEBAPP_HOME=%~dp0%..
set JARPATH=%WEBAPP_HOME%\webapp
if defined JAVA_HOME (
set _EXECJAVA="%JAVA_HOME:"=%"\bin\java
)
if not defined JAVA_HOME (
echo "JAVA_HOME not set."
set _EXECJAVA=java
)
start "%WEBAPP_PROCESS_TITLE%" %_EXECJAVA% -jar %JARPATH%/skywalking-webapp.jar
endlocal
#!/usr/bin/env sh
PRG="$0"
PRGDIR=`dirname "$PRG"`
[ -z "$WEBAPP_HOME" ] && WEBAPP_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
WEBAPP_LOG_DIR="${WEBAPP_HOME}/logs"
JAVA_OPTS=" -Xms256M -Xmx512M"
JAR_PATH="${WEBAPP_HOME}/webapp"
if [ ! -d "${WEBAPP_HOME}/logs" ]; then
mkdir -p "${WEBAPP_LOG_DIR}"
fi
_RUNJAVA=${JAVA_HOME}/bin/java
[ -z "$JAVA_HOME" ] && _RUNJAVA=java
eval exec "\"$_RUNJAVA\" ${JAVA_OPTS} -jar ${JAR_PATH}/skywalking-webapp.jar \
2>${WEBAPP_LOG_DIR}/webapp.log 1> /dev/null &"
if [ $? -eq 0 ]; then
sleep 1
echo "Skywalking Web Application started successfully!"
else
echo "Skywalking Web Application started failure!"
exit 1
fi
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>apm</artifactId>
<groupId>org.apache.skywalking</groupId>
<version>5.0.0-alpha-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-backend-dist</artifactId>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>apm-collector-boot</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.skywalking</groupId>
<artifactId>apm-collector-boot</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<finalName>skywalking-backend</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>dist</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<attach>true</attach>
<tarLongFileMode>posix</tarLongFileMode>
<runOnlyAtExecutionRoot>false</runOnlyAtExecutionRoot>
<descriptors>
<descriptor>${project.basedir}/src/main/assembly/binary.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy file="${project.build.directory}/skywalking-backend.tar.gz"
tofile="${project.basedir}/../packages/skywalking-backend.tar.gz" overwrite="true"/>
<copy file="${project.build.directory}/skywalking-backend.zip"
tofile="${project.basedir}/../packages/skywalking-backend.zip" overwrite="true"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
<!--
~ 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.
~
-->
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>dist</id>
<formats>
<format>zip</format>
<format>tar.gz</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.basedir}/bin</directory>
<outputDirectory>/bin</outputDirectory>
<includes>
<include>*.sh</include>
<include>*.bat</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../apm-collector/apm-collector-boot/target/skywalking-collector-assembly/skywalking-collector/config</directory>
<outputDirectory>/config</outputDirectory>
<includes>
<include>*.yml</include>
<include>*.xml</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../apm-collector/apm-collector-boot/target/skywalking-collector-assembly/skywalking-collector/libs</directory>
<outputDirectory>/collector-libs</outputDirectory>
</fileSet>
</fileSets>
<files>
<file>
<source>${project.basedir}/../apm-webapp/target/skywalking-webapp.jar</source>
<outputDirectory>/webapp</outputDirectory>
<fileMode>0644</fileMode>
</file>
</files>
</assembly>
......@@ -227,26 +227,7 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy file="${project.build.directory}/skywalking-collector-assembly.tar.gz"
tofile="${project.basedir}/../../packages/skywalking-collector.tar.gz" overwrite="true"/>
<copy file="${project.build.directory}/skywalking-collector-assembly.zip"
tofile="${project.basedir}/../../packages/skywalking-collector.zip" overwrite="true"/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
......
......@@ -22,8 +22,7 @@
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>assembly</id>
<formats>
<format>zip</format>
<format>tar.gz</format>
<format>dir</format>
</formats>
<dependencySets>
<dependencySet>
......@@ -32,15 +31,6 @@
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>${project.basedir}/bin</directory>
<outputDirectory>/bin</outputDirectory>
<includes>
<include>*.sh</include>
<include>*.bat</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>/config</outputDirectory>
......
......@@ -64,6 +64,7 @@
<module>apm-collector</module>
<module>apm-protocol</module>
<module>apm-webapp</module>
<module>apm-backend-dist</module>
</modules>
<packaging>pom</packaging>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册