Skip to content

Commit ee44d7a

Browse files
authored
Merge branch 'master' into feature/support-mysql-5.x-plugin
2 parents e9c300b + 8fe052d commit ee44d7a

File tree

15 files changed

+882
-1
lines changed

15 files changed

+882
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@echo off
2+
3+
setlocal
4+
set COLLECTOR_PROCESS_TITLE=Skywalking-Collector
5+
set COLLECTOR_HOME=%~dp0%..
6+
set COLLECTOR_OPTS="-Xms256M -Xmx512M -Dcollector.logDir=%COLLECTOR_HOME%\logs"
7+
8+
set CLASSPATH=%COLLECTOR_HOME%\config;.;
9+
set CLASSPATH=%COLLECTOR_HOME%\libs\*;%CLASSPATH%
10+
11+
if defined JAVA_HOME (
12+
set _EXECJAVA="%JAVA_HOME:"=%"\bin\java
13+
)
14+
15+
if not defined JAVA_HOME (
16+
echo "JAVA_HOME not set."
17+
set _EXECJAVA=java
18+
)
19+
20+
start "%COLLECTOR_PROCESS_TITLE%" %_EXECJAVA% "%COLLECTOR_OPTS%" -cp "%CLASSPATH%" org.skywalking.apm.collector.boot.CollectorBootStartUp
21+
endlocal
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env sh
2+
3+
PRG="$0"
4+
PRGDIR=`dirname "$PRG"`
5+
[ -z "$COLLECTOR_HOME" ] && COLLECTOR_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
6+
7+
COLLECT_LOG_DIR="${COLLECTOR_HOME}/logs"
8+
JAVA_OPTS=" -Xms256M -Xmx512M"
9+
10+
if [ ! -d "${COLLECTOR_HOME}/logs" ]; then
11+
mkdir -p "${COLLECT_LOG_DIR}"
12+
fi
13+
14+
_RUNJAVA=${JAVA_HOME}/bin/java
15+
[ -z "$JAVA_HOME" ] && _RUNJAVA=java
16+
17+
CLASSPATH="$COLLECTOR_HOME/config:$CLASSPATH"
18+
for i in "$COLLECTOR_HOME"/libs/*.jar
19+
do
20+
CLASSPATH="$i:$CLASSPATH"
21+
done
22+
23+
WEBUI_OPTIONS=" -Dcollector.logDir=${COLLECT_LOG_DIR}"
24+
25+
eval exec "\"$_RUNJAVA\" ${JAVA_OPTS} ${WEBUI_OPTIONS} -classpath $CLASSPATH org.skywalking.apm.collector.boot.CollectorBootStartUp \
26+
2>${COLLECT_LOG_DIR}/collector.log 1> /dev/null &"
27+
28+
if [ $? -eq 0 ]; then
29+
sleep 1
30+
echo "Skywalking Web started successfully!"
31+
else
32+
echo "Skywalking Web started failure!"
33+
exit 1
34+
fi
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@echo off
2+
3+
setlocal
4+
call "%~dp0"\collectorService.bat start
5+
endlocal
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env sh
2+
3+
PRG="$0"
4+
PRGDIR=`dirname "$PRG"`
5+
EXECUTABLE=collectorService.sh
6+
7+
exec "$PRGDIR"/"$EXECUTABLE" start

apm-collector/apm-collector-boot/pom.xml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,55 @@
146146
</dependency>
147147
<!-- cache provider -->
148148
</dependencies>
149-
</project>
149+
150+
<build>
151+
<finalName>Skywalking-Collector</finalName>
152+
<plugins>
153+
<plugin>
154+
<artifactId>maven-compiler-plugin</artifactId>
155+
<configuration>
156+
<source>${compiler.version}</source>
157+
<target>${compiler.version}</target>
158+
<encoding>${project.build.sourceEncoding}</encoding>
159+
</configuration>
160+
</plugin>
161+
<plugin>
162+
<groupId>org.apache.maven.plugins</groupId>
163+
<artifactId>maven-resources-plugin</artifactId>
164+
<version>2.4.3</version>
165+
<configuration>
166+
<encoding>${project.build.sourceEncoding}</encoding>
167+
</configuration>
168+
</plugin>
169+
<plugin>
170+
<groupId>org.apache.maven.plugins</groupId>
171+
<artifactId>maven-jar-plugin</artifactId>
172+
<version>2.3.2</version>
173+
<configuration>
174+
<excludes>
175+
<exclude>application.yml</exclude>
176+
<exclude>log4j2.xml</exclude>
177+
</excludes>
178+
</configuration>
179+
</plugin>
180+
<plugin>
181+
<groupId>org.apache.maven.plugins</groupId>
182+
<artifactId>maven-assembly-plugin</artifactId>
183+
<executions>
184+
<execution>
185+
<id>assembly</id>
186+
<phase>package</phase>
187+
<goals>
188+
<goal>single</goal>
189+
</goals>
190+
<configuration>
191+
<descriptors>
192+
<descriptor>src/main/assembly/assembly.xml</descriptor>
193+
</descriptors>
194+
</configuration>
195+
</execution>
196+
</executions>
197+
</plugin>
198+
</plugins>
199+
</build>
200+
</project>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<!--
2+
~ Copyright 2017, OpenSkywalking Organization All rights reserved.
3+
~
4+
~ Licensed under the Apache License, Version 2.0 (the "License");
5+
~ you may not use this file except in compliance with the License.
6+
~ You may obtain a copy of the License at
7+
~
8+
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~
10+
~ Unless required by applicable law or agreed to in writing, software
11+
~ distributed under the License is distributed on an "AS IS" BASIS,
12+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
~ See the License for the specific language governing permissions and
14+
~ limitations under the License.
15+
~
16+
~ Project repository: https://github.com/OpenSkywalking/skywalking
17+
-->
18+
19+
<assembly
20+
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
23+
<id></id>
24+
<formats>
25+
<format>zip</format>
26+
<format>tar.gz</format>
27+
</formats>
28+
<dependencySets>
29+
<dependencySet>
30+
<outputDirectory>/libs</outputDirectory>
31+
<scope>runtime</scope>
32+
</dependencySet>
33+
</dependencySets>
34+
<fileSets>
35+
<fileSet>
36+
<directory>${project.basedir}/bin</directory>
37+
<outputDirectory>/bin</outputDirectory>
38+
<includes>
39+
<include>*.sh</include>
40+
<include>*.bat</include>
41+
</includes>
42+
<fileMode>0755</fileMode>
43+
</fileSet>
44+
<fileSet>
45+
<directory>src/main/resources</directory>
46+
<outputDirectory>/config</outputDirectory>
47+
<includes>
48+
<include>application.yml</include>
49+
</includes>
50+
</fileSet>
51+
<fileSet>
52+
<directory>src/main/assembly</directory>
53+
<outputDirectory>/config</outputDirectory>
54+
<includes>
55+
<include>log4j2.xml</include>
56+
</includes>
57+
</fileSet>
58+
<fileSet>
59+
<directory>src/main/resources</directory>
60+
<includes>
61+
<include>application.yml</include>
62+
<include>log4j2.xml</include>
63+
</includes>
64+
<outputDirectory>/config</outputDirectory>
65+
</fileSet>
66+
</fileSets>
67+
</assembly>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2017, OpenSkywalking Organization All rights reserved.
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ 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+
~ Project repository: https://github.com/OpenSkywalking/skywalking
18+
-->
19+
20+
<Configuration status="error">
21+
<Properties>
22+
<Property name="log-path">${sys:collector.logDir}</Property>
23+
</Properties>
24+
<Appenders>
25+
<RollingFile name="RollingFile" fileName="${log-path}/skywalking-web-server.log"
26+
filePattern="${log-path}/skywalking-web-server-%d{yyyy-MM-dd}-%i.log" >
27+
<PatternLayout>
28+
<pattern>%d - %c -%-4r [%t] %-5p %x - %m%n</pattern>
29+
</PatternLayout>
30+
<Policies>
31+
<SizeBasedTriggeringPolicy size="102400KB" />
32+
</Policies>
33+
<DefaultRolloverStrategy max="30"/>
34+
</RollingFile>
35+
</Appenders>
36+
<Loggers>
37+
<logger name="org.skywalking.apm.ui" level="debug">
38+
<AppenderRef ref="RollingFile"/>
39+
</logger>
40+
<Root level="info">
41+
<AppenderRef ref="RollingFile"/>
42+
</Root>
43+
</Loggers>
44+
</Configuration>
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ /*
4+
~ * Copyright 2017, OpenSkywalking Organization All rights reserved.
5+
~ *
6+
~ * Licensed under the Apache License, Version 2.0 (the "License");
7+
~ * you may not use this file except in compliance with the License.
8+
~ * You may obtain a copy of the License at
9+
~ *
10+
~ * http://www.apache.org/licenses/LICENSE-2.0
11+
~ *
12+
~ * Unless required by applicable law or agreed to in writing, software
13+
~ * distributed under the License is distributed on an "AS IS" BASIS,
14+
~ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
~ * See the License for the specific language governing permissions and
16+
~ * limitations under the License.
17+
~ *
18+
~ * Project repository: https://github.com/OpenSkywalking/skywalking
19+
~ */
20+
-->
21+
22+
<project xmlns="http://maven.apache.org/POM/4.0.0"
23+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25+
<parent>
26+
<artifactId>apm-sdk-plugin</artifactId>
27+
<groupId>org.skywalking</groupId>
28+
<version>3.2.5-2017</version>
29+
</parent>
30+
<modelVersion>4.0.0</modelVersion>
31+
32+
<artifactId>apm-mongodb-2.x-plugin</artifactId>
33+
<packaging>jar</packaging>
34+
35+
<properties>
36+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
37+
</properties>
38+
39+
<dependencies>
40+
<dependency>
41+
<groupId>org.mongodb</groupId>
42+
<artifactId>mongo-java-driver</artifactId>
43+
<version>2.14.2</version>
44+
<scope>provided</scope>
45+
</dependency>
46+
<dependency>
47+
<groupId>org.mongodb</groupId>
48+
<artifactId>bson</artifactId>
49+
<version>2.14.2</version>
50+
<scope>provided</scope>
51+
</dependency>
52+
</dependencies>
53+
<build>
54+
<plugins>
55+
<plugin>
56+
<!-- 源码插件 -->
57+
<groupId>org.apache.maven.plugins</groupId>
58+
<artifactId>maven-source-plugin</artifactId>
59+
<!-- 发布时自动将源码同时发布的配置 -->
60+
<executions>
61+
<execution>
62+
<id>attach-sources</id>
63+
<goals>
64+
<goal>jar</goal>
65+
</goals>
66+
</execution>
67+
</executions>
68+
</plugin>
69+
</plugins>
70+
</build>
71+
</project>

0 commit comments

Comments
 (0)