Skip to content

Commit e0387fb

Browse files
committed
Merge branch 'develop'
* develop: [deploy] scouter version 2.21.2 [client] Improve build compatibility and UI customization Fix Eclipse 2024-03 XML parsing issues and add UI preference settings [client] Upgrade Eclipse platform to 2024-03 and Java to 17 [client] Add macOS support with README and launcher script [agent.java] Add Apache HttpClient 5 dependency and update HttpClient5 implementation - Add httpclient5 dependency to pom.xml with version 5.2.1 (provided scope) - Update HttpClient5 class to use HttpClient5 API methods (getUri instead of getURI) - Update import statements to use org.apache.hc.client5 package [deploy] Bump version to 2.21.1 and fix httpcore5 dependency scope
2 parents f0f6866 + 34b9d26 commit e0387fb

File tree

26 files changed

+262
-64
lines changed

26 files changed

+262
-64
lines changed

build_client.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# download maven from :
55
# https://maven.apache.org
66

7-
if [ ! -z "${JAVA_11_HOME}" ]; then
8-
echo JAVA_11_HOME: ${JAVA_11_HOME}
9-
JAVA_HOME=${JAVA_11_HOME}
7+
if [ ! -z "${JAVA_21_HOME}" ]; then
8+
echo JAVA_21_HOME: ${JAVA_21_HOME}
9+
JAVA_HOME=${JAVA_21_HOME}
1010
fi
1111

1212
MVN="`which mvn`"
@@ -19,5 +19,7 @@ if [ -z "$MVN" ]; then
1919
echo maven not found.
2020
exit 1
2121
else
22+
# Increase XML entity size limit for Eclipse 2024-03 metadata
23+
export MAVEN_OPTS="-Djdk.xml.maxGeneralEntitySizeLimit=0 -Djdk.xml.totalEntitySizeLimit=0"
2224
$MVN -Dtycho.debug.resolver=true -X -f ./scouter.client.build/pom.xml clean package
2325
fi

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>2.21.0</version> <!--scouter-->
7+
<version>2.21.2</version> <!--scouter-->
88
<packaging>pom</packaging>
99

1010
<name>SCOUTER APM</name>

scouter.agent.batch/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>io.github.scouter-project</groupId>
77
<artifactId>scouter-parent</artifactId>
8-
<version>2.21.0</version> <!--scouter-->
8+
<version>2.21.2</version> <!--scouter-->
99
</parent>
1010

1111
<artifactId>scouter-agent-batch</artifactId>

scouter.agent.host/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>2.21.0</version> <!--scouter-->
7+
<version>2.21.2</version> <!--scouter-->
88
</parent>
99

1010
<artifactId>scouter-agent-host</artifactId>

scouter.agent.java/pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>io.github.scouter-project</groupId>
66
<artifactId>scouter-parent</artifactId>
7-
<version>2.21.0</version> <!--scouter-->
7+
<version>2.21.2</version> <!--scouter-->
88
</parent>
99

1010
<artifactId>scouter-agent-java</artifactId>
@@ -434,6 +434,13 @@
434434
<groupId>org.apache.httpcomponents.core5</groupId>
435435
<artifactId>httpcore5</artifactId>
436436
<version>5.2.1</version>
437+
<scope>provided</scope>
438+
</dependency>
439+
<dependency>
440+
<groupId>org.apache.httpcomponents.client5</groupId>
441+
<artifactId>httpclient5</artifactId>
442+
<version>5.2.1</version>
443+
<scope>provided</scope>
437444
</dependency>
438445
<dependency>
439446
<groupId>com.netflix.ribbon</groupId>

scouter.agent.java/src/main/java/scouter/xtra/httpclient/HttpClient5.java

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@
1616
*/
1717
package scouter.xtra.httpclient;
1818

19+
import org.apache.hc.client5.http.classic.methods.HttpGet;
20+
import org.apache.hc.client5.http.classic.methods.HttpPut;
21+
import org.apache.hc.client5.http.classic.methods.HttpUriRequest;
1922
import org.apache.hc.core5.http.Header;
2023
import org.apache.hc.core5.http.HttpHost;
2124
import org.apache.hc.core5.http.HttpRequest;
2225
import org.apache.hc.core5.http.HttpResponse;
23-
import org.apache.http.client.methods.HttpGet;
24-
import org.apache.http.client.methods.HttpPut;
25-
import org.apache.http.client.methods.HttpUriRequest;
2626
import scouter.agent.proxy.IHttpClient;
2727

28-
import java.net.URISyntaxException;
29-
3028
public class HttpClient5 implements IHttpClient {
3129
public String getHost(Object o) {
3230
try {
@@ -75,22 +73,23 @@ public int getResponseStatusCode(Object o) {
7573
}
7674

7775
public String getURI(Object o) {
78-
if (o instanceof HttpUriRequest) {
79-
HttpUriRequest req = (HttpUriRequest) o;
80-
return req.getURI().getPath();
81-
} else if (o instanceof HttpGet) {
82-
HttpGet req = (HttpGet) o;
83-
return req.getURI().getPath();
84-
} else if (o instanceof HttpPut) {
85-
HttpPut req = (HttpPut) o;
86-
return req.getURI().getPath();
87-
} else if (o instanceof HttpRequest) {
88-
HttpRequest req = (HttpRequest) o;
89-
try {
76+
try {
77+
HttpUriRequest request;
78+
if (o instanceof HttpUriRequest) {
79+
HttpUriRequest req = (HttpUriRequest) o;
80+
return req.getUri().getPath();
81+
} else if (o instanceof HttpGet) {
82+
HttpGet req = (HttpGet) o;
83+
return req.getUri().getPath();
84+
} else if (o instanceof HttpPut) {
85+
HttpPut req = (HttpPut) o;
86+
return req.getUri().getPath();
87+
} else if (o instanceof HttpRequest) {
88+
HttpRequest req = (HttpRequest) o;
9089
return req.getUri().toString();
91-
} catch (URISyntaxException e) {
92-
return req.toString();
9390
}
91+
} catch (Exception e) {
92+
return o.toString();
9493
}
9594
return o.toString();
9695
}

scouter.client.build/pom.xml

Lines changed: 78 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>scouter.client</groupId>
@@ -13,14 +13,14 @@
1313
<module>../scouter.client.product</module>
1414
</modules>
1515
<properties>
16-
<tycho-version>2.7.0</tycho-version>
16+
<tycho-version>4.0.8</tycho-version>
1717
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1818
</properties>
1919
<repositories>
2020
<repository>
21-
<id>eclipse-simultaneous-2022-03</id>
21+
<id>eclipse-2024-03</id>
2222
<layout>p2</layout>
23-
<url>https://download.eclipse.org/releases/2022-03/</url>
23+
<url>https://download.eclipse.org/releases/2024-03/</url>
2424
</repository>
2525
</repositories>
2626

@@ -63,5 +63,79 @@
6363
</configuration>
6464
</plugin>
6565
</plugins>
66+
<pluginManagement>
67+
<plugins>
68+
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
69+
<plugin>
70+
<groupId>org.eclipse.m2e</groupId>
71+
<artifactId>lifecycle-mapping</artifactId>
72+
<version>1.0.0</version>
73+
<configuration>
74+
<lifecycleMappingMetadata>
75+
<pluginExecutions>
76+
<pluginExecution>
77+
<pluginExecutionFilter>
78+
<groupId>org.eclipse.tycho</groupId>
79+
<artifactId>target-platform-configuration</artifactId>
80+
<versionRange>[2.0.0,)</versionRange>
81+
<goals>
82+
<goal>target-platform</goal>
83+
</goals>
84+
</pluginExecutionFilter>
85+
<action>
86+
<ignore/>
87+
</action>
88+
</pluginExecution>
89+
<pluginExecution>
90+
<pluginExecutionFilter>
91+
<groupId>org.eclipse.tycho</groupId>
92+
<artifactId>tycho-compiler-plugin</artifactId>
93+
<versionRange>[2.0.0,)</versionRange>
94+
<goals>
95+
<goal>compile</goal>
96+
<goal>testCompile</goal>
97+
<goal>validate-classpath</goal>
98+
</goals>
99+
</pluginExecutionFilter>
100+
<action>
101+
<ignore/>
102+
</action>
103+
</pluginExecution>
104+
<pluginExecution>
105+
<pluginExecutionFilter>
106+
<groupId>org.eclipse.tycho</groupId>
107+
<artifactId>tycho-packaging-plugin</artifactId>
108+
<versionRange>[2.0.0,)</versionRange>
109+
<goals>
110+
<goal>build-qualifier</goal>
111+
<goal>build-qualifier-aggregator</goal>
112+
<goal>validate-id</goal>
113+
<goal>validate-version</goal>
114+
<goal>package-plugin</goal>
115+
</goals>
116+
</pluginExecutionFilter>
117+
<action>
118+
<ignore/>
119+
</action>
120+
</pluginExecution>
121+
<pluginExecution>
122+
<pluginExecutionFilter>
123+
<groupId>org.eclipse.tycho</groupId>
124+
<artifactId>tycho-bnd-plugin</artifactId>
125+
<versionRange>[4.0.0,)</versionRange>
126+
<goals>
127+
<goal>process</goal>
128+
</goals>
129+
</pluginExecutionFilter>
130+
<action>
131+
<ignore/>
132+
</action>
133+
</pluginExecution>
134+
</pluginExecutions>
135+
</lifecycleMappingMetadata>
136+
</configuration>
137+
</plugin>
138+
</plugins>
139+
</pluginManagement>
66140
</build>
67141
</project>

scouter.client.feature/feature.xml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</license>
2222

2323
<plugin
24-
id="javax.servlet"
24+
id="jakarta.servlet-api"
2525
download-size="0"
2626
install-size="0"
2727
version="0.0.0"
@@ -83,6 +83,13 @@
8383
version="0.0.0"
8484
unpack="false"/>
8585

86+
<plugin
87+
id="org.eclipse.debug.core"
88+
download-size="0"
89+
install-size="0"
90+
version="0.0.0"
91+
unpack="false"/>
92+
8693
<plugin
8794
id="org.eclipse.core.variables"
8895
download-size="0"
@@ -131,4 +138,13 @@
131138
version="0.0.0"
132139
unpack="false"/>
133140

141+
<plugin
142+
id="org.eclipse.e4.ui.workbench.renderers.swt.cocoa"
143+
os="macosx"
144+
download-size="0"
145+
install-size="0"
146+
version="0.0.0"
147+
fragment="true"
148+
unpack="false"/>
149+
134150
</feature>

scouter.client.product/pom.xml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66

@@ -58,6 +58,42 @@
5858
</execution>
5959
</executions>
6060
</plugin>
61+
<!-- macOS 배포 패키지에 README와 실행 스크립트 복사 -->
62+
<plugin>
63+
<groupId>org.apache.maven.plugins</groupId>
64+
<artifactId>maven-antrun-plugin</artifactId>
65+
<version>3.1.0</version>
66+
<executions>
67+
<execution>
68+
<id>copy-macos-scripts</id>
69+
<phase>package</phase>
70+
<goals>
71+
<goal>run</goal>
72+
</goals>
73+
<configuration>
74+
<target>
75+
<!-- macOS x86_64 -->
76+
<copy file="${project.basedir}/readme/README-macOS.md"
77+
todir="${project.build.directory}/products/scouter.client.product/macosx/cocoa/x86_64/scouter.client"
78+
failonerror="false"/>
79+
<copy file="${project.basedir}/scripts/run-scouter.command"
80+
todir="${project.build.directory}/products/scouter.client.product/macosx/cocoa/x86_64/scouter.client"
81+
failonerror="false"/>
82+
<!-- macOS aarch64 (Apple Silicon) -->
83+
<copy file="${project.basedir}/readme/README-macOS.md"
84+
todir="${project.build.directory}/products/scouter.client.product/macosx/cocoa/aarch64/scouter.client"
85+
failonerror="false"/>
86+
<copy file="${project.basedir}/scripts/run-scouter.command"
87+
todir="${project.build.directory}/products/scouter.client.product/macosx/cocoa/aarch64/scouter.client"
88+
failonerror="false"/>
89+
<!-- 실행 권한 부여 -->
90+
<chmod file="${project.build.directory}/products/scouter.client.product/macosx/cocoa/x86_64/scouter.client/run-scouter.command" perm="755" failonerror="false"/>
91+
<chmod file="${project.build.directory}/products/scouter.client.product/macosx/cocoa/aarch64/scouter.client/run-scouter.command" perm="755" failonerror="false"/>
92+
</target>
93+
</configuration>
94+
</execution>
95+
</executions>
96+
</plugin>
6197
</plugins>
6298
</build>
63-
</project>
99+
</project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Scouter Client for macOS
2+
3+
## 🚨 처음 실행 전 필수 작업
4+
5+
macOS의 보안 정책(Gatekeeper)으로 인해 서명되지 않은 앱은 실행이 차단됩니다.
6+
처음 실행하기 전에 아래 명령어를 **한 번만** 실행해주세요.
7+
8+
### 방법 1: 터미널 명령어 (권장)
9+
10+
```bash
11+
cd /Applications # 또는 scouter.client.app이 있는 디렉토리
12+
xattr -cr scouter.client.app
13+
```
14+
15+
### 방법 2: 실행 스크립트 사용
16+
17+
패키지에 포함된 `run-scouter.command` 파일을 더블클릭하면 자동으로 처리됩니다.
18+
19+
### 방법 3: 시스템 환경설정에서 허용
20+
21+
1. scouter.client.app 더블클릭 (경고 발생)
22+
2. **시스템 환경설정****보안 및 개인 정보 보호****일반**
23+
3. "scouter.client.app이(가) 차단되었습니다" 옆의 **"확인 없이 열기"** 클릭
24+
25+
## ⚠️ 왜 이런 작업이 필요한가요?
26+
27+
Apple은 인터넷에서 다운로드한 앱에 `quarantine` 속성을 추가합니다.
28+
Apple Developer 인증서로 서명되지 않은 앱은 Gatekeeper가 실행을 차단합니다.
29+
`xattr -cr` 명령어는 이 quarantine 속성을 제거합니다.
30+
31+
## 📋 시스템 요구사항
32+
33+
- macOS 10.14 (Mojave) 이상
34+
- Java 11 이상 (내장됨)
35+

0 commit comments

Comments
 (0)