Skip to content

Commit c82c6a5

Browse files
committed
WIP
1 parent 80d2c84 commit c82c6a5

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Loader for AsyncProfiler
44
[![Maven Central](https://img.shields.io/maven-central/v/me.bechberger/ap-loader-all)](https://search.maven.org/search?q=ap-loader) [![GitHub](https://img.shields.io/github/license/jvm-profiling-tools/ap-loader)](https://github.com/jvm-profiling-tools/ap-loader/blob/main/LICENSE)
55

66
Packages [async-profiler](https://github.com/jvm-profiling-tools/async-profiler) releases in a JAR
7-
with an `AsyncProfilerLoader` (version 3.*, 2.* and 1.8.*)
7+
with an `AsyncProfilerLoader` (version 4.*, 3.*, 2.* and 1.8.*)
88
that loads the suitable native library for the current platform.
99

10-
*In 3.* it also includes the latest [jattach](https://github.com/apangin/jattach) binary. This was previously
10+
*In >= 3.* it also includes the latest [jattach](https://github.com/apangin/jattach) binary. This was previously
1111
part of async-profiler.*
1212

1313
This is usable as a Java agent (same arguments as the async-profiler agent) and as the basis for other libraries.
@@ -50,11 +50,11 @@ from maven central, e.g:
5050
<dependency>
5151
<groupId>me.bechberger</groupId>
5252
<artifactId>ap-loader-all</artifactId>
53-
<version>3.0-9</version>
53+
<version>4.0-9</version>
5454
</dependency>
5555
```
5656

57-
Others are of course available, see [maven central](https://central.sonatype.com/artifact/me.bechberger/ap-loader-all/3.0-9).
57+
Others are of course available, see [maven central](https://central.sonatype.com/artifact/me.bechberger/ap-loader-all/4.0-9).
5858

5959
You can also use [JBang](https://jbang.dev) to simplify the usage of ap-loader. There are examples in documentation below.
6060

@@ -234,7 +234,7 @@ The latest `all` version can be added via:
234234
<dependency>
235235
<groupId>me.bechberger</groupId>
236236
<artifactId>ap-loader-all</artifactId>
237-
<version>3.0-9</version>
237+
<version>4.0-9</version>
238238
</dependency>
239239
```
240240
@@ -248,16 +248,16 @@ It requires a platform supported by async-profiler and Python 3.6+.
248248
249249
```sh
250250
# download the release sources and binaries
251-
python3 ./bin/releaser.py download 3.0
251+
python3 ./bin/releaser.py download 4.0
252252

253253
# build the JAR for the release
254254
# maven might throw warnings, related to the project version setting,
255255
# but the alternative solutions don't work, so we ignore the warning for now
256-
mvn -Dproject.vversion=3.0 -Dproject.subrelease=9 -Dproject.platform=macos package assembly:single
256+
mvn -Dproject.vversion=4.0 -Dproject.subrelease=9 -Dproject.platform=macos package assembly:single
257257
# use it
258-
java -jar target/ap-loader-macos-3.0-9-full.jar ...
258+
java -jar target/ap-loader-macos-4.0-9-full.jar ...
259259
# build the all JAR
260-
mvn -Dproject.vversion=3.0 -Dproject.subrelease=9 -Dproject.platform=all package assembly:single
260+
mvn -Dproject.vversion=4.0 -Dproject.subrelease=9 -Dproject.platform=all package assembly:single
261261
```
262262
263263
Development
@@ -287,7 +287,7 @@ Commands:
287287
clear clear the ap-releases and target folders for a fresh start
288288
```
289289
290-
Deploy the latest version via ` bin/releaser.py download build test deploy` as a snapshot.
290+
Deploy the latest version via `bin/releaser.py download build test deploy` as a snapshot.
291291
292292
For a release use `bin/releaser.py download build test deploy_release`,
293293
but before make sure to do the following for a new sub release:

bin/copy_java_sources.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,9 @@ def either_or_none(*dirs: Path) -> Optional[Path]:
107107
with open(f, "r") as source:
108108
content = "package one.converter;\n" + source.read()
109109
if f.name == "Main.java":
110-
assert "java -cp converter.jar" in content
110+
assert "java -cp converter.jar" in content or "jfrconv [options]" in content
111111
content = content.replace("java -cp converter.jar ", "java -cp ap-loader.jar one.converter.")
112+
content = content.replace("jfrconv [options]", "java -jar ap-loader.jar jfrconv [options]")
112113
elif "Usage: java " in content:
113114
content = content.replace("Usage: java ", "Usage: java -cp ap-loader.jar ")
114115
with open(target_file, "w") as target:

bin/releaser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def get_release_versions(tool: Tool) -> List[str]:
159159

160160
def get_most_recent_release(tool: Tool) -> str:
161161
return [version for version in get_release_versions(tool) if
162-
version.startswith("3.") or version.startswith("2.")][0]
162+
version.startswith("3.") or version.startswith("4.") or version.startswith("2.")][0]
163163

164164

165165
def get_release_info(tool: Tool, release: str) -> str:
@@ -530,7 +530,7 @@ def cli():
530530
get_most_recent_release(Tool.ASYNC_PROFILER)),
531531
"versions": lambda: print(" ".join(
532532
version for version in get_release_versions(Tool.ASYNC_PROFILER) if
533-
version.startswith("2.") or version.startswith("3."))),
533+
version.startswith("2.") or version.startswith("3.") or version.startswith("4."))),
534534
"download": lambda: download_release(release),
535535
"build": lambda: build_release(release),
536536
"test": lambda: test_release(release),

0 commit comments

Comments
 (0)