New build matrix for JDKs 8, 11, and 15

This commit is contained in:
Bruno Borges 2021-03-16 07:51:13 -07:00
Родитель 0c0109e624
Коммит f8a3427a09
3 изменённых файлов: 17 добавлений и 10 удалений

8
.github/workflows/maven.yml поставляемый
Просмотреть файл

@ -11,15 +11,17 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11, 15]
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
- name: Set up JDK
uses: actions/setup-java@v2-preview
with:
java-version: 11
java-version: ${{ matrix.java }}
distribution: 'adopt'
- name: Build with Maven
run: mvn -B package --file pom.xml

Просмотреть файл

@ -30,11 +30,11 @@ This example illustrates some of the API.
MBeanServerConnection mBeanServer = ManagementFactory.getPlatformMBeanServer();
try {
var flightRecorderConnection = FlightRecorderConnection.connect(mBeanServer);
var recordingOptions = new RecordingOptions.Builder().disk("true").build();
var recordingConfiguration = RecordingConfiguration.PROFILE_CONFIGURATION;
FlightRecorderConnection flightRecorderConnection = FlightRecorderConnection.connect(mBeanServer);
RecordingOptions recordingOptions = new RecordingOptions.Builder().disk("true").build();
RecordingConfiguration recordingConfiguration = RecordingConfiguration.PROFILE_CONFIGURATION;
try (var recording = flightRecorderConnection.newRecording(recordingOptions, recordingConfiguration)) {
try (Recording recording = flightRecorderConnection.newRecording(recordingOptions, recordingConfiguration)) {
recording.start();
TimeUnit.SECONDS.sleep(10);
recording.stop();

11
pom.xml
Просмотреть файл

@ -12,7 +12,11 @@
<name>Java Flight Recorder Streaming Library</name>
<description>A library for streaming JFR files via the FlightRecorderMXBean</description>
<url>https://github.com/Microsoft/jfr-streaming.git</url>
<url>https://github.com/Microsoft/jfr-streaming</url>
<organization>
<name>Microsoft Corporation</name>
<url>http://microsoft.com</url>
</organization>
<licenses>
<license>
@ -25,13 +29,13 @@
<scm>
<connection>scm:git:git@github.com:Microsoft/jfr-streaming.git</connection>
<developerConnection>scm:git:git@github.com:Microsoft/jfr-streaming.git</developerConnection>
<url>https://github.com/Microsoft/jfr-streaming.git</url>
<url>https://github.com/Microsoft/jfr-streaming</url>
</scm>
<developers>
<developer>
<id>microsoft</id>
<name>Microsoft</name>
<name>Microsoft Corporation</name>
</developer>
</developers>
@ -73,6 +77,7 @@
</build>
</profile>
</profiles>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>