Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing tools jar, add github workflow and add how to use for newer versions #21

Merged
merged 5 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build

on:
- push
- pull_request

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
name: Checkout repo

- name: Set up JDK 17 (LTS)
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
cache: maven

- name: Build with Maven
run: mvn install

- uses: actions/upload-artifact@v2
name: Upload Artifact
with:
name: WarmRoast
path: target/warmroast-*.jar
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ WarmRoast is an easy-to-use CPU sampling tool for JVM applications, but particul
* See the percentage of CPU time for each method relative to its parent methods.
* Maintains style and function with use of "File -> Save As" (in tested browsers).

**Download Latest Version:** http://builds.enginehub.org/job/warmroast/last-successful/
### Download

Java 7 and above is required to use WarmRoast.
**Latest release**: [here](../../releases)

**Latest build**: [here](../../actions/workflows/build.yml)

Screenshots
-----------
Expand All @@ -24,6 +26,14 @@ Screenshots
Usage
-----

## For Java 9 and newer

The `tools.jar` is automatically included into JDK's since Java 9. You only should use something like this:

java -cp warmroast-1.0.0-SNAPSHOT.jar com.sk89q.warmroast.WarmRoast --thread "Server thread"

## For Java 7 & 8

1. Note the path of your JDK.

2. Download WarmRoast.
Expand Down
50 changes: 1 addition & 49 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<version>1.0.0-SNAPSHOT</version>
<name>WarmRoast</name>
<url>http://www.sk89q.com</url>

<scm>
<connection>scm:git:git://github.com/sk89q/warmroast.git</connection>
<url>https://github.com/sk89q/warmroast</url>
Expand Down Expand Up @@ -101,59 +102,10 @@
</excludes>
</filter>
</filters>
<artifactSet>
<excludes>
<exclude>com.sun:tools</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>tools-default</id>
<activation>
<activeByDefault>true</activeByDefault>
<file>
<exists>${java.home}/../lib/tools.jar</exists>
</file>
</activation>
<properties>
<toolsJar>${java.home}/../lib/tools.jar</toolsJar>
</properties>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${toolsJar}</systemPath>
</dependency>
</dependencies>
</profile>
<profile>
<id>tools-mac</id>
<activation>
<activeByDefault>false</activeByDefault>
<file>
<exists>${java.home}/../Classes/classes.jar</exists>
</file>
</activation>
<properties>
<toolsJar>${java.home}/../Classes/classes.jar</toolsJar>
</properties>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.6.0</version>
<scope>system</scope>
<systemPath>${toolsJar}</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
</project>